Hey, i am currently trying to add support for inheritance-based
queries to the redis-adapter and i got some strange behavior inside
the query object that
is passed to the read function of the adapter.

If i for instance use this class structure like described here:
http://datamapper.org/docs/misc.html

->

  class Person
        include DataMapper::Resource

        property :name, String
        property :job,  String,        :length => 1..255
        property :type, Discriminator
        property :id, Serial
      end

      class Woman    < Person; end
      class Mother   < Woman;  end
      class Daughter < Woman;  end

and i query for

 Woman.all
 or Mother.all

i can receive a conditions from the query object that contains
something like "type IN [Woman, Mother,Daughter]" or "type IN
[Mother]"
which is fine.

But if i query for "Person.all" the condition flied of the query
object is empty?

Is this a bug or do i have to handle discriminator based queries
different inside the read function of an adapter?

Cheers,
Sebastian


-- 
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en.

Reply via email to