cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Juan Manuel Diaz Lara <>
Subject NullPointerException in addToManyTarget and removeToManyTarget
Date Fri, 08 Apr 2016 23:30:22 GMT
I am using Cayenne 4.0.M3.
I want to build an graph of persistent objects  using the api for many targets, but I get
the following trace:
Exception in thread "main" java.lang.NullPointerException
    at org.apache.cayenne.CayenneDataObject.addToManyTarget(
    at org.example.cayenne.Main.setupNewDocumentoInventarioWithNewProduct(
    at org.example.cayenne.Main.main(
Which relevan line on cayenne code is:
        getObjectContext().propertyChanged(this, relName, null, value);
this fails because the source object is transient (so, does not have an objectcontex). The
same happens with removeToManyTarget. Atte. Juan Manuel Díaz Lara
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message