My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 40: Child objects in persistent collections with user-defined @Order not persisted
2 people starred this issue and may be notified of changes. Back to list
Status:  Verified
Owner:  max.r...@gmail.com
Closed:  Apr 2009


Sign in to add a comment
 
Project Member Reported by max.r...@gmail.com, Apr 22, 2009
  @PersistenceCapable(identityType = IdentityType.APPLICATION)
  public static class Parent {

    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    Long id;

    @Persistent
    @Order(mappedBy = "index")
    List<Child> children = new ArrayList<Child>();

    public List<Child> getChildren() {
      return children;
    }

    public Long getId() {
      return id;
    }
  }

  @PersistenceCapable(identityType = IdentityType.APPLICATION)
  public static class Child {

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

    @Persistent
    private int index;
  }

The save of the child is delayed due to the presence of an @Order annotation but we never get 
the callback from DataNucleus that we expect.
Apr 22, 2009
Project Member #1 max.r...@gmail.com
The workaround is to use a list-ordering extension, which is what people should be using anyway since index 
columns don't scale.
Apr 22, 2009
Project Member #2 max.r...@gmail.com
(No comment was entered for this change.)
Status: Fixed
May 14, 2009
Project Member #3 max.r...@gmail.com
(No comment was entered for this change.)
Status: Verified
Sign in to add a comment

Powered by Google Project Hosting