JPA: How do I specify the table name corresponding to a class at runtime?

前端 未结 5 2297
执笔经年
执笔经年 2020-12-01 05:11

(note: I\'m quite familiar with Java, but not with Hibernate or JPA - yet :) )

I want to write an application which talks to a DB2/400 database through JPA and I ha

5条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-01 05:31

    If you don't mind binding your self to Hibernate, you could use some of the methods described at https://www.hibernate.org/171.html . You may find your self using quite a few hibernate annotations depending on the complexity of your data, as they go above and beyond the JPA spec, so it may be a small price to pay.

提交回复
热议问题