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

Moderators: Site Manager, fjwalraven
Why do you think so?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
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. "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
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.
You are right. This has now been fixed.heaven wrote:By spec:This means, that it is valid for the argument to be Account type in this caseCode: 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.
Users browsing this forum: No registered users and 10 guests