Re: Need Help on EOModel Auto update of DATE column for DirectToWeb app

Paul Hoadley <[email protected]> Mon, 9 Nov 2009 20:35:53 +1030
Newsgroups gmane.comp.web.webobjects.devel
Message-ID <[email protected]>
On 09/11/2009, at 7:22 PM, Pierre Gilquin wrote:

> You can use trigger in the database
> or with EOF, you can implement validateForInsert() and  
> validateForUpdate()
> in the Java class of your entity

You don't want to go modifying EO attributes in validateForInsert() or  
validateForUpdate():

http://wiki.objectstyle.org/confluence/display/WO/EOF-Using+EOF-The+EOF+Commandments

Depending on the OP's specific requirements, s/he might be able to use  
awakeFromInsertion() or awakeFromFetch(), or, better still,  
ERXEnterpriseObject's willInsert() or willUpdate().  See which of  
those fits the specific requirements.


-- 
Paul.

w  http://logicsquad.net/
h  http://paul.hoadley.name/

_______________________________________________
WebObjects-dev mailing list
[email protected]
http://www.omnigroup.com/mailman/listinfo/webobjects-dev