如何将greenDAO与JSON Jackson集成并处理多对多关系映射 [英] How to integrate greenDAO with JSON Jackson and handle many to many relation mapping

查看:280
本文介绍了如何将greenDAO与JSON Jackson集成并处理多对多关系映射的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有将JSON Jackson与greenDAO集成的最佳方法.另外,如何使用greenDAO处理多对多关系映射.我发现,我们需要创建一个连接表以具有多对多映射.有没有将所有这些功能结合在一起的示例.

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.

推荐答案

您可以在dao Generator文件编辑entity.ftl

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

并添加必要的行以集成Jackson 即

and add necessary lines to integrate Jackson ie

import com.fasterxml.jackson.annotation.JsonProperty; 

@JsonProperty("Tag Name")

因此您不必为此编写任何额外的代码.

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

这篇关于如何将greenDAO与JSON Jackson集成并处理多对多关系映射的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆