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

All the posts and topics that contain only an error report will be moved here after the error is corrected. This is to ensure that when users view a question in ETS Viewer, the "Discuss" button will not indicate the presence of a discussion that adds no value to the question.

Moderators: Site Manager, fjwalraven

Post Reply
Peter

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

Post 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.

admin
Site Admin
Posts: 10384
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post by admin »

You are right. This option is mistakenly set as correct. This is now fixed.

thank you for your feedback!

Peter

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

Post by Peter »

OK, Thanks!

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests