Qualifiers, many-to-many and horizontal inheritance
Qualifiers, many-to-many and horizontal inheritance
- Subject: Qualifiers, many-to-many and horizontal inheritance
- From: Timo Hoepfner <email@hidden>
- Date: Fri, 21 Jul 2006 23:39:13 +0200
Hi,
I have some entity (Asset, representing files with added meta info)
which has a many-to-many relationship to an abstract entity (Keyword)
in a horizontal inheritance scheme (subclasses are very heterogenous.
All they have in common is a "name" attribute).
Navigating through the object graph works fine, but I have some
problem figuring out how to build qualifiers that do what I want. I
want to build qualifiers that match
1. Any Asset which has a certain filename
2. All Assets that have no associated Keyword and have a certain
filename
3. All Assets that belong to a certain Keyword and have a certain
filename
4. All Assets that belong to any Keyword in a given list of Keywords
and have a certain filename (Some of the concrete Keyword subclasses
build a tree and I want to match Assets belonging to a certain
Keyword and all of its children)
1. is trivial
2. I've built a FetchSpec utilizing raw SQL, which does the "no
associated" keyword stuff, but I have no clue how to pass bindings to
a FetschSpec when using raw SQL (to get the "match filename" stuff)
3. Can be done easily by navigating via asset.keywords, but I'd like
to build a qualifier to be able to restrict by other attributes, too
(w/o doing in-memory filtering). I haven't been able to build an
EOQualifier (w/o raw sql) which does that. I think there should be a
way... In most cases I get either NPEs, CCEs or SQL-Exceptions,
because the generated SQL tries to look into tables which don't exist
(abstract), etc. I also tried to use some of the Wonder qualifiers,
but no luck so far.
4. Basically the same situation as 3.
I'd be more than thankful for a bit of help!
Timo
_______________________________________________
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