openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "roger.keays" <roger.ke...@ninthavenue.com.au>
Subject change primary key value?
Date Sat, 17 Feb 2007 11:37:15 GMT

Is there a way to change the primary key of an entity in OpenJPA? The
expection below doesn't fill me with hope...

Cheers,

Roger


 <4|false|0.9.6-incubating>
org.apache.openjpa.persistence.InvalidStateException: Attempt to change a
primary key field of an instance that already has a final object id. Only
new, unflushed instances whose id you have not retrieved can have their
primary keys changed. FailedObject:
figbird.lists.entities.Email-info@sunburnt.com.au

   
org.apache.openjpa.kernel.StateManagerImpl.assertNoPrimaryKeyChange(StateManagerImpl.java:1819)
   
org.apache.openjpa.kernel.StateManagerImpl.settingStringField(StateManagerImpl.java:1800)
    figbird.lists.entities.Email.pcSetemail(Email.java)
    figbird.lists.entities.Email.setEmail(Email.java:36)
   ...
-- 
View this message in context: http://www.nabble.com/change-primary-key-value--tf3244417.html#a9018988
Sent from the open-jpa-dev mailing list archive at Nabble.com.


Mime
View raw message