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

Reply via email to