
Eager loading breaks validations when STI is used
Reported by Marcin Kulik | May 14th, 2010 @ 11:52 AM | in 1.1
Check following gist for details:
Looks like validations are broken because eager loading doesn't handle STI in proper way.
I'ts reproducible on 0.10.2 and on master, under ruby 1.8.7 and 1.9.1.
Comments and changes to this ticket
-
Dan Kubb (dkubb) May 29th, 2010 @ 01:57 AM
- State changed from new to unconfirmed
- Assigned user cleared.
-
Piotr Solnica (solnic) October 24th, 2010 @ 01:30 PM
- State changed from unconfirmed to confirmed
- Milestone set to 1.1
- Assigned user set to Piotr Solnica (solnic)
- Milestone order changed from 0 to 0
-
Piotr Solnica (solnic) October 24th, 2010 @ 05:37 PM
- State changed from confirmed to resolved
(from [98bc41a1b4e263ca4ed7b6347d6649e2af59794d]) 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...
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
People watching this ticket
Referenced by
-
1270 Eager loading breaks validations when STI is used [#1270 state:resolved] http://github.com/datamapper/dm-c...