cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aleksey V. Katorgin" <progmons...@gmail.com>
Subject setToOneTarget not works for two transient objects (3.1B1)
Date Wed, 07 Nov 2012 04:39:31 GMT
Hi! I've manually created two transient DataObjects (Group and GroupItem
for example) and now I want to set relationship between its.

    groupItem.setGroup(group);


But it throws NPE:

java.lang.NullPointerException
at
org.apache.cayenne.CayenneDataObject.setToOneTarget(CayenneDataObject.java:278)

Because of trying to raise property:
     getObjectContext().propertyChanged(this, relationshipName, oldTarget,
value);

with null objectContext.


Is it feature  what I can't set relationship for transient objects or bug?




Thanks.

-- 
Aleksey V. Katorgin,
Sr. developer, architect

Russia, Chelyabinsk
cell: +79085792691
skype: aleksey_katorgin

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