Hibernate Mapping Two Tables to One Class

前端 未结 4 1526
梦毁少年i
梦毁少年i 2020-12-09 23:40

I need to map two tables to a single class, having trouble figuring this out. One table is ROOMS, the other is TRAINERS.

The ROOMS table:

OOC_UNIT         


        
4条回答
  •  清歌不尽
    2020-12-10 00:10

    You can create a named query that is binded to a custom object. This is the solution I would go with, since no changes to the DB would be necessary.

提交回复
热议问题