cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kanwar Manish <kanwarman...@gmail.com>
Subject NullPointerException - org.apache.cayenne.CayenneDataObject.setReverseRelationship
Date Fri, 08 Jun 2012 12:22:03 GMT
Three Classes : CreationLog, UserGroup, LogicalFolder.

Both UserGroup and LogicalFolder would have the same CreationLog details.
Error is at the last line of code below.

1. None of the Objects are Transient here.
2. Or the issue is that the same object can't be used here - Relation is
one-one with both UserGroup and LogicalFolder.

------CODE STARTS-----
CreationLog cl = dc.newObject(CreationLog.class);
cl.setCLUserMaster(um);

LogicalFolder lf = dc.newObject(LogicalFolder.class);
lf.setLFCreationLog(cl);

UserGroup ug = dc.newObject(UserGroup.class);
ug.setUGCreationLog(cl);
------CODE ENDS-------

Thanks
KM

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