• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Setting Default Values EOModeler
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Setting Default Values EOModeler


  • Subject: Re: Setting Default Values EOModeler
  • From: Anjo Krank <email@hidden>
  • Date: Mon, 1 Aug 2005 21:42:13 +0200


Am 01.08.2005 um 20:34 schrieb Chuck Hill:

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.

It might well have been a cascading delete, but I don't really remember.

That the state is "totally thrashed" is a bug of it's own, though. What's the bug number?:)

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

Kids, listen to the man :) He sure got it right.

Actually, my implementation is a loose rewrite of something I've seen a few years ago from some dutch site. I found it to be to good an idea to let it pass. And it wasn't very hard to do. AFAIR, I wrote it on the train to the Wocoa in Lausanne.

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.

Yup. Like ERXValidation for example, a light-weight version of Validity, without the fancy editor stuff.


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


  • Follow-Ups:
    • Re: Setting Default Values EOModeler
      • From: Chuck Hill <email@hidden>
References: 
 >Re: Setting Default Values EOModeler (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: Deployment with 5.3?
  • Next by Date: Re: Deployment with 5.3?
  • Previous by thread: Re: Setting Default Values EOModeler
  • Next by thread: Re: Setting Default Values EOModeler
  • Index(es):
    • Date
    • Thread