• 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: Default values in EOF
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Default values in EOF


  • Subject: Re: Default values in EOF
  • From: Ricardo Strausz <email@hidden>
  • Date: Fri, 29 Apr 2005 13:12:10 -0500

Hola Sako!
Remember that the philosophy of EOF is to put all the logic in your EO's ---not in the database or else-were. Therefore the mechanism proposed to accomplish this is to put your default values on code in your EORecords.


From the docs:

public void awakeFromInsertion(EOEditingContext ec)
Overridden by subclasses to perform additional initialization on the receiver upon its being inserted into ec. This is commonly used to assign default values or record the time of insertion. EOCustomObject's implementation merely sends an awakeObjectFromInsertion to the receiver's EOClassDescription. Subclasses should invoke super's implementation before performing their own initialization.


Suerte!
Dino


On Apr 27, 2005, at 12:55, email@hidden wrote:

Message: 13
Date: Wed, 27 Apr 2005 19:18:48 +0200
From: email@hidden
Subject: Default values in EOF
To: "WebObjects Dev (Apple)" <email@hidden>
Message-ID: <00e301c54b4d$2cd2baa0$email@hidden>
Content-Type: text/plain; charset="iso-8859-1"

Hello,
i have in the databse some default values for some attributes.
Some of these attributes do not accept null.
My problem is, EOF does not know the attributes have default value. if user
does not inserts any value an exception is thorwn.


Any can give me a hint to solve this?

Thank you,
Sako.

_______________________________________________ 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: Default values in EOF
      • From: email@hidden
  • Prev by Date: Re: Tiger, Xcode 2, Java 1.5!
  • Next by Date: Re: Fetching By Date
  • Previous by thread: Re: Fetching By Date
  • Next by thread: Re: Default values in EOF
  • Index(es):
    • Date
    • Thread