Page 1 of 1

About Question enthuware.oce-jpad.v6.2.445 :

Posted: Fri Mar 16, 2012 12:56 am
by Peter
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.

Re: About Question enthuware.oce-jpad.v6.2.445 :

Posted: Fri Mar 16, 2012 11:54 am
by admin
You are right. This option is mistakenly set as correct. This is now fixed.

thank you for your feedback!

Re: About Question enthuware.oce-jpad.v6.2.445 :

Posted: Wed Mar 21, 2012 9:17 pm
by Peter
OK, Thanks!