google应用程序引擎中的自加入(java)

google应用程序引擎中的自加入(java),java,google-app-engine,jdo,Java,Google App Engine,Jdo,我已经修改了GoogleAppEngine(java)附带的留言簿示例,使用某种形式的“自连接”来包含父子关系 现在,我的greeting.java文件如下所示 package guestbook; import java.util.Date; import java.util.List; import javax.jdo.annotations.IdGeneratorStrategy; import javax.jdo.annotations.IdentityType; impor

我已经修改了GoogleAppEngine(java)附带的留言簿示例,使用某种形式的“自连接”来包含父子关系

现在,我的greeting.java文件如下所示

    package guestbook;

import java.util.Date;
import java.util.List;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;
import com.google.appengine.api.users.User;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Greeting {
    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Key id;

    @Persistent
    private User author;

    @Persistent
    private String content;

    @Persistent
    private Date date;

    @Persistent
    private Greeting parent;

    @Persistent(mappedBy="parent")
    private List<Greeting> children;

    public Greeting getParent() {
        return parent;
    }

    public void setParent(Greeting parent) {
        this.parent = parent;
    }

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

    public void setChildren(List<Greeting> children) {
        this.children = children;
    }

    public Greeting(User author, String content, Date date) {
        this.author = author;
        this.content = content;
        this.date = date;
    }

    public Key getId() {
        return id;
    }

    public User getAuthor() {
        return author;
    }

    public String getContent() {
        return content;
    }

    public Date getDate() {
        return date;
    }

    public void setAuthor(User author) {
        this.author = author;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public void setDate(Date date) {
        this.date = date;
    }
}
套餐留言簿;
导入java.util.Date;
导入java.util.List;
导入javax.jdo.annotations.IdGeneratorStrategy;
导入javax.jdo.annotations.IdentityType;
导入javax.jdo.annotations.PersistenceCapable;
导入javax.jdo.annotations.Persistent;
导入javax.jdo.annotations.PrimaryKey;
导入com.google.appengine.api.datastore.Key;
导入com.google.appengine.api.users.User;
@PersistenceCapable(identityType=identityType.APPLICATION)
公开课问候语{
@主键
@持久性(valueStrategy=IdGeneratorStrategy.IDENTITY)
私钥id;
@持久的
私人用户作者;
@持久的
私有字符串内容;
@持久的
私人日期;
@持久的
私人问候父母;
@持久性(mappedBy=“父级”)
私人名单儿童;
公共问候语getParent(){
返回父母;
}
public void setParent(问候家长){
this.parent=parent;
}
公共列表getChildren(){
返回儿童;
}
公共子项(列出子项){
这个。孩子=孩子;
}
公共问候语(用户作者、字符串内容、日期){
this.author=作者;
this.content=内容;
this.date=日期;
}
公钥getId(){
返回id;
}
公共用户getAuthor(){
返回作者;
}
公共字符串getContent(){
返回内容;
}
公共日期getDate(){
返回日期;
}
public void setAuthor(用户作者){
this.author=作者;
}
公共void setContent(字符串内容){
this.content=内容;
}
公共作废设置日期(日期){
this.date=日期;
}
}
请注意,添加了父字段和子字段,并将主键类型更改为com.google.appengine.api.datastore.key(如中所示)

现在它不会将数据保存到数据存储中。我不明白为什么。我已经尝试过删除本地数据存储和索引文件(如网络上的某个地方所说),但它不起作用。没有例外,什么都没有


是否有人可以调查一下,并请提供帮助

这是谷歌应用程序引擎中的一个已知问题

现在,我需要更改我的数据模型以使用应用程序引擎