• 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: EO/Java class default Values
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EO/Java class default Values


  • Subject: Re: EO/Java class default Values
  • From: Ken Anderson <email@hidden>
  • Date: Wed, 27 Sep 2006 06:39:41 -0400

Exactly.  You should always set default values through the implementation of awakeFromInsertion(), like this:

public void awakeFromInsertion(EOEditingContext ec) {
super.awakeFromInsertion(ec);
this.setSomething(aValue);
}

Ken

On Sep 27, 2006, at 3:07 AM, Markus Ruggiero wrote:

I can only think that the creation and insertion of the EO into the editing context does this. However I would not use the constructor to init any default value but implement the dedicated method awakeFromInsertion() for this purpose. The constructor is also executed when you read the object data from the database and the framework re-constructs your EO. This is probably not what you want.

 _______________________________________________
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: EO/Java class default Values
      • From: David LeBer <email@hidden>
References: 
 >EO/Java class default Values (From: Tarun Reddy <email@hidden>)
 >Re: EO/Java class default Values (From: Markus Ruggiero <email@hidden>)

  • Prev by Date: Re: Displaying Unicode encoded characters
  • Next by Date: Re: EO/Java class default Values
  • Previous by thread: Re: EO/Java class default Values
  • Next by thread: Re: EO/Java class default Values
  • Index(es):
    • Date
    • Thread