Re: Null-Pointers from a to Many array
Re: Null-Pointers from a to Many array
- Subject: Re: Null-Pointers from a to Many array
- From: Chuck Hill <email@hidden>
- Date: Tue, 05 Oct 2004 13:26:16 -0700
Yes, you have done something wrong. Check:
1. Must call super in awakeFromInsertion
2. Must call super in awakeFromFetch
3. Must insert into EC before accessing relationhip
4. If navigating to this object via a relationship from another object,
check the referential integrity in the DB. Invalid references are
translated into dummy fault objects with null values
5. If using KVC to get the relationship, did you spell the key correctly?
There are probably more...
Chuck
At 08:45 AM 05/10/2004 +1000, Greg Hulands wrote:
>Hi,
>When I try to access the array of a to many relationship and it
>contains no records, instead of returning an empty array, it returns
>null. I am using wonder if that makes a difference. Is this a normal
>thing? It seems a pain in the ass that each time I want to iterate over
>a to many array I have to check to see if it isn't null.
>
>Am I doing something wrong?
>
>Regards,
>Greg
>
> _______________________________________________
>Do not post admin requests to the list. They will be ignored.
>Webobjects-dev mailing list (email@hidden)
>Help/Unsubscribe/Update your Subscription:
e.net
>
>This email sent to email@hidden
>
--
Chuck Hill email@hidden
Global Village Consulting Inc. http://www.global-village.net
_______________________________________________
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