cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Juergen Saar <>
Subject Refresh ObjectId for meaningful PK
Date Wed, 29 Jul 2009 12:43:40 GMT

I'm working on an 20 year old project with meaningful primary keys.

Till now, we used cayenne only for reading but now we are working on the
first 'real' Web-Components that handle Order-Data.

So I have to create the primary key myself.

In the Modeller I created ObjAttributes for the PK-Fields and use the
setters to transfer the PK-Values to the Business-Object.

In most cases this seems to work, only sometimes a CayenneRuntimeExeption
tells me some Problems about temporary ObjectIds. The Data are stored pretty
correct in the Database Tables.

In some cases, especially on 1:1 Relations there are Problems with the
Foreign Keys.

So I try to setup my own ObjectId with the generated Values for the primary
Key and put this into the DataObject by setObjectId().

This brings the whole BusinessObject in trouble.

Is there a correct way to solve this problem?

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message