cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aristedes Maniatis <...@maniatis.org>
Subject Re: Question on how to properly create parent-child nested dependent objects?
Date Tue, 19 Sep 2017 13:16:21 GMT
On 19/9/17 11:01PM, Andrew Willerding wrote:
> The CommunicationType object does not yet exist permanently in the database table so
how or when does it generate the primary key for the object to be referenced by another object
before it is committed?  I was hoping to not have to worry about this as a "high-level" user
of Cayenne.


You are right, you don't need to worry about all that. Just create one context and save it
at the end. Cayenne tracks the relationships between objects with a temporary key internally,
but you don't need to think about that. Once Caynenne commits, everything is assigned proper
primary keys and joined.

Ari


-- 
-------------------------->
Aristedes Maniatis
GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A

Mime
View raw message