On 26.03.2007, at 11:16, Chuck Hill wrote:
to avoid null pointer exceptions all over the place (and/or to
avoid having to write lots of code to check that the relationships
were non-null). I took the following steps:
You should never need to worry about that. If the to-many
relationships are null, you have overridden awakeFromInsertion
(and / or awakeFromFetch) and failed to call
super.awakeFromInsertion / awakeFromFetch. EOF automatically sets
these to empty arrays in the super implementation.
What I do to help preventing that, is creating awakeFromInsertion and
awakeFromFetch in my EOGenerator template as a method stub that only
calls super() and has a comment for "initialize your object
here ...". So I only have to put in the code at that place and can't
possibly forget to call super().
cug
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]