Hi,
I think the last choice is not correct,
@OneToOne(cascade=CascadeType.REMOVE)
because in the explanation you said that Address will NOT be remove because there is no link between them, I am puzzled.
Situation 2:
Person p = (Person) em.find(Person.class, 1); //find the person with address
Address a = p.getAddress(); //an Address entity also exists for this person
p.setAddress(null);
a.setPerson(null); //required only if it is bidirectional
em.remove(p); //Address a will NOT be removed because there is no link between p and a anymore.
About Question enthuware.oce-jpad.v6.2.445 :
Moderators: Site Manager, fjwalraven
-
- Site Admin
- Posts: 10058
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-jpad.v6.2.445 :
You are right. This option is mistakenly set as correct. This is now fixed.
thank you for your feedback!
thank you for your feedback!
If you like our products and services, please help us by posting your review here.
Who is online
Users browsing this forum: No registered users and 52 guests