Re: to-many relationship fetching
Re: to-many relationship fetching
- Subject: Re: to-many relationship fetching
- From: Chuck Hill <email@hidden>
- Date: Tue, 29 Apr 2003 15:24:46 -0700
- Organization: Global Village Consulting, Inc.
That does not mean the objects have not been fetched. That means
there really are no related objects. Check your DB to ensure the data
you expect really is there. No, seriously, go check it again. If it
is there and the keys match and all that, then check the EOModel. You
have set up the relationship incorrectly.
Or perhaps you are fetching objectA incorrectly? What does the code
to fetch it look like?
Chuck
Anurag Khare wrote:
There is hardly any code as I am trying to print the NSArray.
I have just written System.out.prinln(objectA.relationshipname()) and it
prints "()" ..
From: Chuck Hill <email@hidden>
Reply-To: email@hidden
To: Anurag Khare <email@hidden>
CC: email@hidden
Subject: Re: to-many relationship fetching
Date: Tue, 29 Apr 2003 14:13:18 -0700
Do you mean that
objectA.relationshipname() == null
or
objectA.relationshipname().length() == 0
The first should be impossible unless you've done something bad in the
code.
The latter indicates that there are no related objects. NOTE: this
does NOT mean that they have not been fetched yet, but that there are
no related rows in the database! This would suggest either a modeling
error or a misunderstanding of the data in your database.
Chuck
Anurag Khare wrote:
Entity B has to-one relationship to Entity A. Entity A has to-many
relationship to Entity B. I fetch "A" and wish to get details(ARRAY)
from "B". Using ObjectA.relationshipname() to get Array but it shows
null...
I do not know how to set "-EOAdaptorDebugEnabled true" in launch
argument. Could you please elaborate...
Thanks
Anurag
From: Art Isbell <email@hidden>
To: email@hidden
Subject: Re: to-many relationship fetching
Date: Tue, 29 Apr 2003 09:17:54 -1000
On Tuesday, April 29, 2003, at 07:37 AM, Anurag Khare wrote:
I am using WO 5.2 and Sybase 12.5.0.2 as database. I am having a
to-many relationship between two tables.
I am assuming that EntityA has a to-many relationship,
EntityA.entityBs, to EntityB. But EntityA and EntityB might be
related many-to-many as well which could change things. Please
provide a little more detail about the relationship that you want to
prefetch.
I have used prefetching option in the EOModel to fetch the to-many
array through the relaionship key but I get null in the array.
Have you verified by setting the launch argument
"-EOAdaptorDebugEnabled true" that EntityA's are being fetched but
that related EntityB's are not being fetched?
Aloha,
Art
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
--
Chuck Hill email@hidden
Global Village Consulting Inc. http://www.global-village.net
Progress is the mother of all problems.
- G. K. Chesterton
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail
--
Chuck Hill email@hidden
Global Village Consulting Inc. http://www.global-village.net
Progress is the mother of all problems.
- G. K. Chesterton
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.