Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/339.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
appengine-java持久化_Java_Google App Engine_Persistent - Fatal编程技术网

appengine-java持久化

appengine-java持久化,java,google-app-engine,persistent,Java,Google App Engine,Persistent,我有三个与关系有关的类: 成员1-n跟踪器 链路1-n跟踪器 拥有一对多的双向关系 @PersistenceCapable(identityType = IdentityType.APPLICATION) public class Member { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key key; @Pe

我有三个与关系有关的类:

  • 成员1-n跟踪器
  • 链路1-n跟踪器
拥有一对多的双向关系

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

        @Persistent(mappedBy = "member")
        private List<Tracker> trackers;

}

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

        @Persistent(mappedBy = "link")
        private List<Tracker> trackers;

}

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

        @Persistent
        private Member member;

        @Persistent
        private Link link;

} 
它抛出

The class "The class "zodpob.model.Tracker" is not persistable. This
means that it either hasnt been enhanced, or that the enhanced version
of the file is not in the CLASSPATH (or is hidden by an unenhanced
version), or the Meta-Data/annotations for the class are not found."
is not persistable. This means that it either hasnt been enhanced, or
that the enhanced version of the file is not in the CLASSPATH (or is
hidden by an unenhanced version), or the Meta-Data for the class is
not found.
“增强”是什么意思


如果我持久化了一个没有关系的类,那么它工作得很好

请确保您使用的是DataNucleus插件

这是他们的网站

…下面是如何将其安装到Eclipse IDE上

…这里有一个与JDO一起使用的tut


我希望这会有帮助,祝你好运。

我不知道appengine,但增强版听起来像某种字节码增强版。也许appengine在运行代码之前需要一个准备步骤?他们确实使用DataNucleus来增强它。
The class "The class "zodpob.model.Tracker" is not persistable. This
means that it either hasnt been enhanced, or that the enhanced version
of the file is not in the CLASSPATH (or is hidden by an unenhanced
version), or the Meta-Data/annotations for the class are not found."
is not persistable. This means that it either hasnt been enhanced, or
that the enhanced version of the file is not in the CLASSPATH (or is
hidden by an unenhanced version), or the Meta-Data for the class is
not found.