Java App Engine JDO持久类从com.google.appengine.api.datastore.Key迁移到Long
我一直在努力获得一个在GAE上运行的应用程序,以支持其他平台,如Jetty服务器的单个实例 一个持久的JDO类,其主键定义如下:Java App Engine JDO持久类从com.google.appengine.api.datastore.Key迁移到Long,java,mysql,google-app-engine,Java,Mysql,Google App Engine,我一直在努力获得一个在GAE上运行的应用程序,以支持其他平台,如Jetty服务器的单个实例 一个持久的JDO类,其主键定义如下: @PersistenceCapable(identityType = IdentityType.APPLICATION, detachable = "false") @Inheritance(strategy = InheritanceStrategy.SUBCLASS_TABLE) public abstract class Foo implements Bar {
@PersistenceCapable(identityType = IdentityType.APPLICATION, detachable = "false")
@Inheritance(strategy = InheritanceStrategy.SUBCLASS_TABLE)
public abstract class Foo implements Bar {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
protected Key key;
密钥是com.google.appengine.api.datastore.key
如果不进行数据迁移,是否可以将此字段转换为Long或其他平台(如mySQL)支持的内容,而不需要使用应用程序引擎库?好的,看起来可以将其转换为字符串,我很乐意
@PersistenceCapable(identityType = IdentityType.APPLICATION, detachable = "false")
@Inheritance(strategy = InheritanceStrategy.SUBCLASS_TABLE)
public abstract class EntityStore implements Entity {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
protected String key;