Re: Another plea for help from a newbie
Re: Another plea for help from a newbie
- Subject: Re: Another plea for help from a newbie
- From: Art Isbell <email@hidden>
- Date: Thu, 3 Jun 2004 09:52:14 -1000
On Jun 3, 2004, at 8:32 AM, Justin Tocci wrote:
SOLVED! Ya-hoo!!
Thanks James Cicenia for this little bit of code:
>Part part = (Part)companyDisplayGroup.selectedObject();
>session.setkitNumber(part.kitNumber);
This still looks like you're doing things the old relational database
client way rather than the object-oriented EOF way. I.e., this object
seems to be being used to explicitly fetch a related object when you
should be able to merely follow the relationship path and let EOF do
the fetching for you, but only if it needs to. In an earlier message
that I no longer have, I think you mentioned that kitNumber was the
foreign key of a relationship. Primary and foreign keys are normally
not class properties and should not be accessed in one's Java code. If
that relationship is named "kit" in your eomodel, part.kit() would be
the appropriate way to access the kit related to the part.
Also, you're setting a Session instance variable rather than passing
the object directly to the next component. Normally, Session shouldn't
be cluttered with such objects, but there are situations in which this
is appropriate.
But maybe I don't understand your situation...
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.