cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <do...@xsinet.co.za>
Subject Re: Validation and @PrePersist
Date Wed, 01 Mar 2017 13:14:39 GMT
Hi Hugi

For this kind of thing use @PostAdd instead.

Regards
Jurgen


-----Original Message----- 
From: Hugi Thordarson
Sent: Wednesday, March 1, 2017 1:18 PM
To: user@cayenne.apache.org
Subject: Validation and @PrePersist

Hi all,
I have some logic in a Listener that uses @PrePersist to populate the value 
of a required attribute before committing changes. Turns out this doesn’t 
work, since Cayenne invokes validateForInsert() before running @PrePersist.

Any suggestions for where I can invoke logic populates required values 
before validation?

Cheers,
- hugi 


Mime
View raw message