Cascading the one-to-one delete operation

The CascadeType.REMOVE is also inherited from the CascadeType.ALL configuration, so the Post entity deletion triggers a PostDetails entity removal too:

Info info = entityManager.find(Info.class, 1L);
entityManager.remove(info);

The remove generates the following operations:

delete from InfoDetails where id = 1
delete from Info where id = 1
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.222.200.143