cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: Modeler Reverse Engineered Entities Don't Match
Date Thu, 01 Nov 2012 06:37:18 GMT
PK and FK columns are intentionally not mapped as ObjAttributes. An FK is redundant (you already
have a mapped relationship for that), and PK is presumed to be of no consequence in the object
model, so it is hidden inside ObjectId of each persistent object. For meaningful PKs, you
can create ObjAttributes yourself. And if you need to read a value of a hidden PK, use org.apache.cayenne.Cayenne
utility class.

Andrus

On Oct 31, 2012, at 1:52 AM, Garth Keesler <garthk@gdcjk.com> wrote:

> Very new at Cayenne. Trying to extract the DBEntities and OBJEntities from a PG database
as shown in the tutorial. All tables in the selected schema are extracted but the resultant
DB and OBJ entities don't match each other WRT the number of attributes. I'm still looking
for a pattern but it seems that the DBEntities match the schema while the OBJEntities are
typically missing at least one attribute; sometimes several. I'm still RTFMing but any helpful
pointers would be appreciated.
> 
> Thanx,
> Garth
> 


Mime
View raw message