我一直在努力获得一个在GAE上运行的应用程序,以支持其他平台,如Jetty Server的单个实例。
一个具有主键的持久化JDO类,定义如下:
@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 )支持的字段,并且不需要使用应用引擎库?
发布于 2013-10-18 02:39:51
好的,看起来只需要把它转换成一个字符串就可以了,我可以开始了。
@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;https://stackoverflow.com/questions/19434360
复制相似问题