There are two completely identical answers.
X
Y
Y
X
X
Y
X
Y
About Question enthuware.oce-jpad.v6.2.420 :
Moderator: admin
-
- Posts: 3
- Joined: Sat Aug 29, 2015 1:30 pm
- Contact:
-
- Site Admin
- Posts: 10043
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-jpad.v6.2.420 :
No, I see that the third option is YY.
If you like our products and services, please help us by posting your review here.
-
- Posts: 358
- Joined: Fri Nov 29, 2013 8:26 pm
- Contact:
Re: About Question enthuware.oce-jpad.v6.2.420 :
Hi, everyone,
According to the spec section 3.5.2:
Any comments?
According to the spec section 3.5.2:
I think when the merge is called in this case, the PrePersist should be called according to the spec.For entities to which the merge operation has been applied and causes the creation of newly managed instances, the
PrePersist callback methods will be invoked for the managed instance after the entity state has
been copied to it.
Any comments?
-
- Site Admin
- Posts: 10043
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-jpad.v6.2.420 :
From what you have quoted, "For entities to which the merge operation has been applied and causes the creation of newly managed instances,..."
In this question, the merge operation does not cause the creation of a new entity. So why do you expect PrePersist to be called?
Paul.
In this question, the merge operation does not cause the creation of a new entity. So why do you expect PrePersist to be called?
Paul.
If you like our products and services, please help us by posting your review here.
-
- Posts: 358
- Joined: Fri Nov 29, 2013 8:26 pm
- Contact:
Re: About Question enthuware.oce-jpad.v6.2.420 :
I tried with Eclipselink. If X is a new entity that does not exist in the database, a entityManager.merge (x); statement will create and persist that entity. Then, the Pre/post Persist is called.
But that may be only happening in Eclipselink.
But that may be only happening in Eclipselink.
Who is online
Users browsing this forum: No registered users and 21 guests