Re: [google-appengine] Re: JDO: Owned 1 to Many relationship between the objects of the same class

2010-02-15 Thread Alexander Arendar
Hi Ian,

thank you for explanation. I voted for that issue. Hope it will get is fixed
a bit faster :)

Sincerely,
Alex

On Sat, Feb 13, 2010 at 4:35 PM, Ian Marshall wrote:

> Hi Alex,
>
> You might care to star datanucleus-appengine issue 80 (Recursive
> relation does not work).
>
> Cheers,
>
> Ian
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to google-appeng...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: JDO: Owned 1 to Many relationship between the objects of the same class

2010-02-13 Thread Ian Marshall
Hi Alex,

You might care to star datanucleus-appengine issue 80 (Recursive
relation does not work).

Cheers,

Ian

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: JDO: Owned 1 to Many relationship between the objects of the same class

2010-02-12 Thread Marc Provost
Hi Alex,

This is a known issue. Check out this thread for discussion +
workarounds: 
http://groups.google.com/group/google-appengine-java/browse_thread/thread/3affdf1441f864b6

Marc

On Feb 12, 3:55 am, Alexander Arendar 
wrote:
> Hi guys,
>
> yesterday I was trying to model a simple forum comments. Just a
> comments which you can add more comments to.
> So, the approximation of the entity is like this:
> ---
> @PersistenceCapable (detachable = "true", identityType =
> IdentityType.APPLICATION)
> public class CommentEntity {
>
>         @PrimaryKey
>         @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
>         private Key key;
>
>         @Persistent
>         private String category;
>
>         @Persistent
>         private String commentDate;
>
>         @Persistent
>         private String userName;
>
>         @Persistent
>         private String commentBody;
>
>         @Persistent
>         private List children = new
> ArrayList();
>
>         getters/setters/etc.
>
> }
>
> DataNucleus enhancement goes ok, no errors in the console.
> Call of the pm.makePersistent() goes without any exceptions for such
> entity.
> BUT IT IS NOT PERSISTED.
>
> I found out that problem is in "children" property. And the problem is
> it's a list of objects of the same class as the parent entity. If I
> comment that property declaration the entity is persisted. Also if I
> change the type of the child entities to some new class (not extending
> the CommentEntity) it also gets persisted.
>
> So my suspicion is that JDO (or GAE JDO impl) does not allow child
> entities to be of the same class. Is it correct? Maybe I'm missing
> something essential? Please advice.
>
> Sincerely,
> Alex

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.