Hibernate derived property with xml mapping

后端 未结 2 1344
北恋
北恋 2021-01-19 14:08

I have a Detectable class with a Revisions set, which are Hibernate managed POJOs. I\'m also mapping my entities using hbm.xml files. Wh

2条回答
  •  情歌与酒
    2021-01-19 14:50

    I finally achieved it with this code:

    
    

    Where id_detectable is my current entity key column.


    UPDATE

    Another workaround is to use a DB view to obtain the last revision date. Then, there's the choice to map the Entity against that view instead of the original table.

提交回复
热议问题