2009-08-13 2 views
2

애플 리케이션 엔진에 트리 구조를 저장하려고합니다. 내 수업에는 부모와 같은 유형의 자녀 목록이 있습니다. 모든 것은 children 속성을 추가 할 때까지 작동합니다. pm.makePersistent()를 호출하면 오류가 없지만 객체는 저장되지 않습니다. 왜 이것이 작동하지 않는지 아는 사람이 있습니까?동일한 유형의 자녀가있는 App Engine 클래스

이것은 내 수업입니다. App Engine 버전 1.2.2를 사용하고 있습니다.

@PersistenceCapable(identityType = IdentityType.APPLICATION) 
public class Composite { 
    @PrimaryKey 
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) 
    private Key id; 
    @Persistent 
    private String name; 
    @Persistent 
    private Composite parent; 
    @Persistent(mappedBy = "parent") 
    private List<Composite> children; 
    public Composite(String name) { 
     this.name = name; 
    } 
    public Key getId() { 
     return id; 
    } 
    public void setId(Key id) { 
     this.id = id; 
    } 
    public String getName() { 
     return name; 
    } 
    public void setName(String name) { 
     this.name = name; 
    } 
    public void setParent(Composite parent) { 
     this.parent = parent; 
    } 
    public Composite getParent() { 
     return parent; 
    } 
    public List<Composite> getChildren() { 
     return children; 
    } 
    public void addChild(Composite child) { 
     this.children.add(child); 
    } 
} 
+0

모든 성공 등의 문제? 또는 부모 관계 처리를 DAO로 이전 했습니까? –

+0

나는이 문제도 다루었 다. –

답변

0

GAE/J DataNucleus 플러그인의 문제 추적기를 살펴보십시오.

Issue 73

Issue 125

+1

그건 나쁘군요. 데이터 구조와 같은 트리를 구성 할 수 있다는 것은 매우 중요합니다 .-( –