Which way is more efficient to get particular EOEnterpriseObject
Which way is more efficient to get particular EOEnterpriseObject
- Subject: Which way is more efficient to get particular EOEnterpriseObject
- From: "Gennady Kushnir" <email@hidden>
- Date: Thu, 16 Aug 2007 03:25:12 +0400 (MSD)
- Importance: Normal
Hello, List
It is not an unresolvable problem. However I just want to perform tasks in
the most efficient way.
I have a to-many relationship, which points to rather large (about 100)
heap of objects.
I need to get one of these objects - which one depends on some other
attributes of one (or get null if there isn't one that match).
And I have to take them that way one by one and possibly do that with all
of them.
This is done while placing info from these objects to the appropriate
place on page.
In fact I have something like multidimensional (3) array of objects.
The question is - which method for performing that task is the most
efficient in WebObject framework?
Ideas I have so far:
- cycle through array (which I get from relationship attribute), checking
if attributes match
- construct EOQualifier and filter the array with it
- just fetch required object regarding mentioned relationship as just one
of attributes involved
- index that array converting it into actual multi-dimensional as
mentioned above (using pure Java multidimensional arrays or nesting
NSArrays/NSDictionaries)
Sorting wil not do as the order in which objects will be needed is uneasy
to predict
Also this is not immutable and other objects into the array may appear -
so I want to have them on their place immediately.
Regards,
Gennady
_______________________________________________
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