How to integrate greenDAO with JSON Jackson and handle many to many relation mapping

妖精的绣舞 提交于 2019-12-21 17:39:12

问题


Is there any best way to integrate JSON Jackson with greenDAO. Also, how to handle many to many relation mapping using greenDAO. I found that, we need to create a connecting table to have many to many mapping. Is there any example having all these features together.


回答1:


You can do it in dao Generator file edit entity.ftl

and add necessary lines to integrate Jackson ie

import com.fasterxml.jackson.annotation.JsonProperty; 

and

@JsonProperty("Tag Name")

Thus you dont have to write any extra code for this.



来源:https://stackoverflow.com/questions/18374306/how-to-integrate-greendao-with-json-jackson-and-handle-many-to-many-relation-map

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!