Hi,

I can't have my child-object have an order. The following code fails
with:

javax.jdo.JDOFatalUserException: Detected attempt to establish
Topic(2) as the parent of SubTopic(9) but the entity identified by
SubTopic(9) has already been persisted without a parent.  A parent
cannot be established or changed once an object has been persisted.


@PersistenceCapable(identityType = IdentityType.APPLICATION,
detachable = "true")
public class Topic {

        @PrimaryKey
        @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
        private Key key;

        @Order(extensions = @Extension(vendorName="datanucleus", key="list-
ordering", value="position asc"))
        @Persistent(defaultFetchGroup = "true", mappedBy = "topic")
        @Element(dependent = "true")
        private List<SubTopic> subTopics = new ArrayList<SubTopic>();

If I leave out the @Order everything works as expected. I do need the
ordering however. Is there some other way to achive the same?

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to