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

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
cosminvacaroiu

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

Post 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 :)

cosminvacaroiu

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

Post 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 :-?

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

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

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

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

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

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

heaven

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

Post 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

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

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

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

Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests