Re: Setting Default Values EOModeler
Re: Setting Default Values EOModeler
- Subject: Re: Setting Default Values EOModeler
- From: Chuck Hill <email@hidden>
- Date: Mon, 1 Aug 2005 11:34:40 -0700
On Jul 31, 2005, at 11:26 PM, Anjo Krank wrote:
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).
What sort of failed saveChanges()? I've seen this when a delete rule
was set to deny or validateForDeletion threw. In those cases the EC
state is totally trashed.
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)
Well, yes, if you use Project Wonder there is always something that
will do it. :-) But "Out of the box" EOF has no facility for this.
There are many, many useful things that can be done with the userInfo
dictionary.
Chuck
--
Practical WebObjects - a book for intermediate WebObjects developers
who want to increase their overall knowledge of WebObjects, or those
who are trying to solve specific application development problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
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