readManyOf: aSuperclassButNotItsSubclasses

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

readManyOf: aSuperclassButNotItsSubclasses

jtuchel
Hi,

I have a small class hierarchy mapped to a table and I am using a FilteredTypeResolver to mark a record as instance of a certain class in the hierarchy, meaning there is a column (and pseudoVariable) named 'type' that indicates what class a row is an instance of.

If I want to readManyOf: for a superclass, Glorp returns instances of the superclass and of all mapped subclasses in that table. And that is a good thing. Unless I explicitly only want to read instances of this exact class in a hierarchy (not necessarily the root class, but in my case it is).

So how can I read instances of one class and none of its subclasses in a special query? The only way I can think of for now is to use that pseudo variable, but most of the times when I solve a problem, I later find out Glorp has something much more clever to offer ;-)

Joachim

--
You received this message because you are subscribed to the Google Groups "glorp-group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/glorp-group.
For more options, visit https://groups.google.com/d/optout.