How to specify object custom serialization in ORMLite?

后端 未结 2 1259
逝去的感伤
逝去的感伤 2021-01-21 19:55

I would like to store some field of type ParentClass as json string into my database. I don\'t want to use Serializable interface and DataType.SERIALIZABLE cause it ties with fu

2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-21 20:37

    Don't register the persister adapter in the onCreate() method. This method only gets called when your database is first created. You should add this somewhere else, like your constructor or onOpen() method.

提交回复
热议问题