为什么ormlite有自己的注释? [英] Why ormlite has its own annotations?

查看:185
本文介绍了为什么ormlite有自己的注释?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从我在ormlite中看到的,它已经实现了它的注释以及JPA标准注释。首先,设计一组新注释的原因是什么?
其次,如何使用标准注释(如 @Entity 等)而不是ormlite特定注释。现在,我没有为这些实体定义错误。我需要一个jar文件吗?

From what I see in ormlite it has implemented its annotations as well as JPA standard annotations. First of all, what was the reason of designing new set of annotations? Secondly, how one can use standard annotation like @Entity, etc instead of ormlite specific annotations. Right now, I am getting not defined error for those entities. Do I need a jar file?

推荐答案

因为它不是真正的JPA实现,只是使用JPA注释方便。显然,通过使用它,你会失去JPA本身提供的可移植性,但是在非常特殊的情况下它可能会有一些优势

Because it isn't a real JPA implementation, and just makes use of JPA annotations for convenience. Obviously, by using it, you lose the portability offered by JPA itself, but then it may have some advantages for very specific situations

这篇关于为什么ormlite有自己的注释?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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