cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Juan Manuel Diaz Lara <jmdia...@yahoo.com.INVALID>
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(CayenneDataObject.java:248)
    at com.ace.pcexpress.pos.model.auto._DocumentoInventario.addToDetalle(_DocumentoInventario.java:92)
    at org.example.cayenne.Main.setupNewDocumentoInventarioWithNewProduct(Main.java:350)
    at org.example.cayenne.Main.main(Main.java:80)
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
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message