can someone please explain me @MapsId in hibernate?

后端 未结 5 1661
天涯浪人
天涯浪人 2020-11-29 03:34

Can someone please explain to me @MapsId in hibernate? I\'m having a hard time understanding it.

It would be great if one could explain it with an examp

5条回答
  •  借酒劲吻你
    2020-11-29 03:43

    MapsId lets you use the same primary key between two different entities/tables. Note: when you use MapsId, the CASCADE.ALL flag becomes useless, and you will need to make sure that your entities are saved manually.

提交回复
热议问题