#588 ✓resolved
Phil Darnowsky

one-to-many associations where the many side is an STI subclass don't work

Reported by Phil Darnowsky | October 8th, 2008 @ 11:05 PM

Run the attached script which involve Bars that are a subclass of BarBase and belong to a Foo, and you get this error:


/usr/lib/ruby/gems/1.8/gems/dm-core-0.9.6/lib/dm-core/query.rb:413:in `append_condition': Unknown property 'type' (ArgumentError)
        from /usr/lib/ruby/gems/1.8/gems/dm-core-0.9.6/lib/dm-core/query.rb:197:in `initialize'
        from /usr/lib/ruby/gems/1.8/gems/dm-core-0.9.6/lib/dm-core/query.rb:196:in `each'
        from /usr/lib/ruby/gems/1.8/gems/dm-core-0.9.6/lib/dm-core/query.rb:196:in `initialize'
        from /usr/lib/ruby/gems/1.8/gems/dm-core-0.9.6/lib/dm-core/scope.rb:42:in `new'
        from /usr/lib/ruby/gems/1.8/gems/dm-core-0.9.6/lib/dm-core/scope.rb:42:in `merge_with_default_scope'
        from /usr/lib/ruby/gems/1.8/gems/dm-core-0.9.6/lib/dm-core/model.rb:402:in `scoped_query'
        from /usr/lib/ruby/gems/1.8/gems/dm-core-0.9.6/lib/dm-core/model.rb:252:in `all'
        from /usr/lib/ruby/gems/1.8/gems/dm-core-0.9.6/lib/dm-core/associations/relationship.rb:90:in `send'
         ... 8 levels...
        from /usr/lib/ruby/gems/1.8/gems/dm-core-0.9.6/lib/dm-core/associations/relationship.rb:80:in `get_children'
        from /usr/lib/ruby/gems/1.8/gems/dm-core-0.9.6/lib/dm-core/associations/one_to_many.rb:251:in `children'
        from /usr/lib/ruby/gems/1.8/gems/dm-core-0.9.6/lib/dm-core/associations/one_to_many.rb:309:in `method_missing'
        from one_to_many_sti.rb:32

Comments and changes to this ticket

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.

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 »

People watching this ticket

Attachments

Pages