cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amedeo Mantica <amedeomant...@me.com>
Subject Issue with same entity relationship
Date Sat, 06 May 2017 18:07:49 GMT
Hi all,

I have setup a Table with self entity relationship (let say parent/children)

so in database I have along with other columns:

ID
PARENT_ID

set with relationship:




Code:

ObjectContext ec = databaseController.newContext();

        DCTest t1 = Cayenne.objectForPK(ec, DCTest.class, 1000000);
        DCTest t2 = Cayenne.objectForPK(ec, DCTest.class, 1000001);

        t1.setParent(t2);

        ec.commitChanges();


all other attributes of the objects get updated except parent/chindren relationship

Any idea ?
Thank you
Amedeo



Mime
View raw message