有没有Java语言使用“注解”、“反射”写的小型ORM?
PHP中文网
PHP中文网 2017-04-18 09:42:36
0
6
423

想自己试着写一个orm,使用注解和反射来实现,但是没有思路。在网上也没有找到类似的开源项目,有没有谁知道啊?
谢谢!

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(6)
小葫芦

Please refer to the source code of nutz.

大家讲道理

http://study.163.com/course/c...

Peter_Zhu

mybatis.
nutz contains too much.

大家讲道理

1. Annotation (refer to JPA specification, definition of annotation, acquisition of annotation)
2. Reflection (call method, get return value)
3. SQL generation (get the parameters [table, column] in the annotation, generate sql)
4. Obtain the return value through reflection, reflect it into the class, and assemble the parameters

洪涛

Refer to this: http://www.oschina.net/code/s... There are only a few hundred lines of code. It’s just code under Android. To transplant it to ordinary JAVA, you need to make slight modifications.

伊谢尔伦

Openjpa

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template