cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Gentry <>
Subject Re: The right way to populate meaningful keys
Date Thu, 30 Jul 2009 14:08:27 GMT
Cayenne, by default, doesn't map keys from the DbEntity (database
definition) to the ObjEntity (Java definition), but you can go into
the ObjEntity and add them and it should be fine.  After you do that,
just call the set/get methods for the keys to set/get them.  If you
set a key on a new object before you commitChanges(), Cayenne will use
your key instead of trying to generate one.


On Thu, Jul 30, 2009 at 1:24 AM, Juergen Saar<> wrote:
> Hi all,
> I'm using cayenne within an old 4GL-Project with meaningful Primary Keys.
> Is there a 'best practice' to get this keys into the DataObject-Instance?
> Actually I've various trouble with this ...
> Any hint or code-sniplet would be helpful ...
> -Juergen-

View raw message