cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joseph Schmidt <joseph_schmid...@yahoo.com>
Subject Re: "Can't get primary key from temporary id" :(
Date Wed, 22 Apr 2009 16:57:30 GMT
>  You might also take a look at the 3.0 lifecycles that Ari mentioned
> in the issue, but my guess is that JPA lifecycles won't do what is
> needed.
I did. To be inside the same transaction for writing,  PrePersist would 
be the logical choice
(from what I understood the docs). The very short documentation from here:
http://cayenne.apache.org/doc/lifecycle-callbacks.html
mentions that this happens "after ObjectId and ObjectContext are set"

The problem is that at that moment tying to write(access the value of 
the PK) I still get the same error message like the title of this post. 
It looks like ObjectId does not have the PK at that moment yet :(.


thanks,
Joseph.


Mime
View raw message