I've been working to get an app that runs on GAE to support other platforms like a single instance of a Jetty Server.

我一直在努力获得一个在GAE上运行的应用程序,以支持其他平台,例如Jetty Server的单个实例。

A Persistent JDO class with a primary key defined like this:

一个持久的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;

The key is a com.google.appengine.api.datastore.Key;

关键是com.google.appengine.api.datastore.Key;

Short of doing a data migration, is it possible to somehow convert this field to a Long or something that's supported in other platforms like mySQL and not needing to use an app-engine library?

没有进行数据迁移,是否有可能以某种方式将此字段转换为Long或其他平台(如mySQL)支持的内容,而不需要使用app-engine库?

1 个解决方案

#1


0

ok looks like it's possible to just convert it to a string and i'm good to go.

好吧看起来可以将它转换为字符串,我很高兴。

@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;

更多相关文章

  1. MongoDB中的按组计算的字段

随机推荐

  1. Google 的设计主管谈开发中的 Ice Cream
  2. Android(安卓)SurfaceFlinger学习文档
  3. Android 蓝牙开发(整理大全)
  4. Android自学之路,ToolBar的使用标题居中颜
  5. Android O / Android 8.0 新特性及开发指
  6. 阅读《Android(安卓)从入门到精通》(11)—
  7. Android 事件流详解之View事件分发
  8. Android深度定制化TabLayout:圆角,渐变色,背
  9. 另一个视角搞android——《Android软件安
  10. 修改android原型button样式