#823 ✓resolved
Michael Klishin (antares)

Discriminator type fields are not typecasted for lookups

Reported by Michael Klishin (antares) | March 26th, 2009 @ 03:27 PM | in 0.10.0

Quote: "child_value (in relationship.rb inside get_children) is: ["bob", "Foo", "Person"]. but parent_identity_map instead has ["bob", "Foo", Person] so match does not happen"

Not sure if it is worth implementing but if it's not too hard, we should try

Comments and changes to this ticket

  • Dan Kubb (dkubb)

    Dan Kubb (dkubb) June 7th, 2009 @ 03:27 AM

    • State changed from “unconfirmed” to “resolved”

    I don't believe this is a problem with dm-core/next anymore. The discriminator value should be returned by the adapter as a DataMapper::Model instance. This object will use base_model to get the top-most model in the hierarchy, and use the IdentityMap for that model for the lookup.

    Michael, if you can reproduce this problem with dm-core/next please add a comment to this ticket and I will reopen this.

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 »