Floor ORM 中对象列表的类型转换器
是否有任何方法可以将TypeConverter用于地板数据库中的对象列表,就像我们在Android的房间数据库中一样。
例如,我有具有对象字段列表的实体类;
@Entity(tableName: "example")
class Example {
@PrimaryKey()
String id;
...
List<AnotherObject> objects;
}
如果地板不支持TypeConterter,您会建议使用哪种颤音ORM?
Is there any way to use typeconverter for list of objects in floor database, like we have in room database for android.
For example i have entity class which has field list of objects;
@Entity(tableName: "example")
class Example {
@PrimaryKey()
String id;
...
List<AnotherObject> objects;
}
If floor doesn't support typeconverters which flutter ORM would you recommend to use?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
地板以最佳方式处理它,我的意思是您可以自由开发代码,以将所有类型的数据转换为地板支持的数据类型。
您可以使用这样的东西:
floor handles it in the best way, I mean you are free to develop your code for converting all types of data to a data type that is supported by floor.
You can use something like this: