开发者

Can I create many tables according to the same entity?

What I want to do is that I want to make the many tables dynamically which are the same entity structures. And then I want to refer to the dynamically created ta开发者_StackOverflowbles according to the table name. What I understood from hibernate reference is that I can only create only one table and it should be matched exactly with entity. So I can't find any solution to my problem.

If you know any relevent open source related to my problem or any tip or web site, let me know.


Does it need to be separate tables? Maybe you can add a field called EntityTypeID that is a foreign key to one other table that describes the type for that record? Then you can query the objects separately?


you can use entity-name in order to map the same entity to different tables.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜