Page 1 of 1

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

Posted: Fri Jun 01, 2012 8:13 am
by cosminvacaroiu
I think this is not totally true:

The @PrePersist method, if defined in AlertMonitor class, must take an Object as an argument and must return void.

It can be also Account type :)

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

Posted: Fri Jun 01, 2012 8:19 am
by cosminvacaroiu
And I think that calls to EM can also be made, but they shouldn't affect other entities. It can affect the current one :-?

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

Posted: Sat Jun 09, 2012 1:57 pm
by admin
cosminvacaroiu wrote:I think this is not totally true:

The @PrePersist method, if defined in AlertMonitor class, must take an Object as an argument and must return void.

It can be also Account type :)
Why do you think so?

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

Posted: Sat Jun 09, 2012 1:58 pm
by admin
cosminvacaroiu wrote:And I think that calls to EM can also be made, but they shouldn't affect other entities. It can affect the current one :-?
As noted in the explanation, Section 3.5 says, "In general, the lifecycle method of a portable application should not invoke EntityManager or Query operations, access other entity instances, or modify relationships within the same persistence context. "

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

Posted: Wed Oct 10, 2012 7:14 am
by heaven
By spec:

Code: Select all

Callback methods defined on an entity listener class have the following signature:
void <METHOD>(Object)
The Object argument is the entity instance for which the callback method is invoked. It may be
declared as the actual entity type.
This means, that it is valid for the argument to be Account type in this case

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

Posted: Sun Oct 14, 2012 10:11 am
by admin
heaven wrote:By spec:

Code: Select all

Callback methods defined on an entity listener class have the following signature:
void <METHOD>(Object)
The Object argument is the entity instance for which the callback method is invoked. It may be
declared as the actual entity type.
This means, that it is valid for the argument to be Account type in this case
You are right. This has now been fixed.

thank you for your feedback!
Paul.