[appengine-java] Re: self referral one-to-many relationship with null root
Can someone please answer it. I appreciate it. On Sep 14, 5:09 pm, Arash wrote: > I have a class which has a collection of itself as its children. It is > mapped as : > > @Persistent > private Group parent; > @Persistent(mappedBy= "parent") > private List children; > > The problem is I cannot insert the root object. The call to > makePersistent comes back successfully, but the entity is not in the > database. I guess this object with this mapping can not have null > parents. Is there anyway I can make the parent nullable? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: self referral one-to-many relationship with null root
I myself am having problems with a self-referring tree structure of persistent entities where the root element has no parent and I get the exception org.datanucleus.exceptions.NucleusUserException: Field cloud.persistence.ItemCategory.icParent should be able to provide a reference to its parent but the entity does not have a parent. Did you perhaps try to establish an instance of ItemCategory as the child of an instance of ItemCategory after the child had already been persisted? when attempting to read the root element. Perhaps the DataNucleus plug-in for Google App Engine Issue Nº 80: "Recursive relation does not work" is the relevant issue (which I have now starred to monitor progress)? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: self referral one-to-many relationship with null root
Follow this thread: http://groups.google.co.uk/group/google-appengine-java/browse_frm/thread/3affdf1441f864b6/47e35ad2811de108?lnk=gst&q=self#47e35ad2811de108 It looks like known issue. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---