search

Home  >  Q&A  >  body text

有没有Java语言使用“注解”、“反射”写的小型ORM?

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

PHP中文网PHP中文网2810 days ago429

reply all(6)I'll reply

  • 高洛峰

    高洛峰2017-04-18 09:44:36

    Please refer to the source code of nutz.

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-18 09:44:36

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

    reply
    0
  • 天蓬老师

    天蓬老师2017-04-18 09:44:36

    mybatis.
    nutz contains too much.

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-18 09:44:36

    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

    reply
    0
  • PHP中文网

    PHP中文网2017-04-18 09:44:36

    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.

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-18 09:44:36

    Openjpa

    reply
    0
  • Cancelreply