Re: Setting Default Values EOModeler
Re: Setting Default Values EOModeler
- Subject: Re: Setting Default Values EOModeler
- From: Anjo Krank <email@hidden>
- Date: Mon, 1 Aug 2005 08:26:55 +0200
Am 30.07.2005 um 01:45 schrieb Chuck Hill:
Not in EOModeler, but you can do it in the awakeFromInsertion
method of the EOEnterpriseObjects. That is the proper way to do this.
It would be... if a failed ec.saveChanges wouldn't re-insert deleted
objects into the EC, leading to a call to awakeFromInsertion() all
over again. As an additional measure, you should factor out this code
into a "protected void initialize()" and only call it from
awakeFromInsertion when the GID is not a temporary one (David Teran's
idea, never tested it but it sounds like it should work).
On Jul 29, 2005, at 4:48 PM, Sacha Mallais wrote:
On Jul 29, 2005, at 4:38 PM, Jonathan Miller wrote:
Is there any way to set up a default values in EOModeler?
No.
Sure there is: use ERXGenericRecord in Project Wonder, which has
support for a "default" userInfo key (supporting timestamps,
relationships and so on)
Default values are generally set in awakeFromFetch(). I would
avoid using any database-level default mechanism, just so that you
don't have to deal with data freshness as much.
Default values in the DB are set when you insert the record.
Cheers, Anjo
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden