Changeset [98bc41a1b4e263ca4ed7b6347d6649e2af59794d] by Piotr Solnica

October 24th, 2010 @ 01:42 PM

Model's descendant properties should also be valid in a query

The result of that change is that you can issue a query and use
property names coming from your STI hierachy. In example:

class A

include DataMapper::Resource

property :id, Serial
property :name, String

end

class B < A

property :foo, String

end

A.all(:foo => 'bar') # will work now

[#1270 state:resolved] http://github.com/datamapper/dm-core/commit/98bc41a1b4e263ca4ed7b63...

Committed by Piotr Solnica

  • M lib/dm-core/query.rb
New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »