Re: Deep hierarchical search
Re: Deep hierarchical search
- Subject: Re: Deep hierarchical search
- From: Pierre Bernard <email@hidden>
- Date: Sat, 22 Sep 2007 11:53:21 +0200
If you can express your query as "SELECT ... in (SELECT ...)" you
will be able to code it using the InSubqueryQualifier.
BTW, my qualifiers have a problem with certain set-ups of flattened
relationships. Fixed versions will be released as part of the "Houdah
WebObjects Frameworks". Watch this list for an announcement in October.
Pierre Bernard
Houdah Software s.à r.l.
On Sep 21, 2007, at 10:24 PM, Chuck Hill wrote:
See Pierre Bernards excellent "Qualifiers Additions" at http://
www.bernard-web.com/pierre/webobjects/code.html, as well as some in
Project Wonder. You will probably find some that help with this or
at least can use them as a basis for developing your own.
Chuck
On Sep 20, 2007, at 7:55 PM, Lachlan Deck wrote:
On 21/09/2007, at 11:40 AM, Klaus Berkling wrote:
I hope someone has thoughts on performing a search through a
hierarchical data model.
I have a WO application that receives, stores and retrieves
student study information. More here:
http://www.dyned.com/products/internetrm.shtml
In my model I have a group entity which have sub-groups via one-
to-many relationship back to itself.
Let's call this type 'Category'.
These groups then have classes with students. There is a class
entity with many-to-many relationships to the student entity.
Let's call the join table 'Enrolment'
(this is sounding familiar, with some minor diffs :)
There is a search I need to implement that returns matching
groups, classes and students within a givem parent group.
1. matching groups/categories are easily resolved by working back
from matching classes. e.g.,
NSSet classesResultSet; // assume exists
NSSet matchingGroups = new NSSet( ( NSArray )
classesResultSet.allObjects().valueForKey( Klass.CategoryKey ) );
2. resolving matching classes or students depends on the search
criteria... i.e., what determines the result set? Is it based on
particular types of students, day or week, etc? Are the studends
filtered by the resulting classes or vice versa?
i.e., if you can break it down a bit more a build an appropriate
qualifier for the either classes or students...
I can reach all the objects through relationships so starting
with a parent group I can walk through all the sub-groups,
classes and students arrays. This is time consuming.
Indeed. You'll want to create a qualifier and ensure you've got
good indexing happening.
I'm trying to think of a fetch specification that avoids some of
the recursive looping I do now.
See above.
with regards,
--
Lachlan Deck
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40global-village.net
This email sent to email@hidden
--
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
- - -
Houdah Software s. à r. l.
http://www.houdah.com
HoudahGeo: One-stop photo geocoding
HoudahSpot: Powerful Spotlight frontend
_______________________________________________
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