#767 ✓resolved
Gary Yngve

child property creeps into parent query (STI)

Reported by Gary Yngve | January 14th, 2009 @ 10:49 AM

causes crash, because property_set can't find it.

see repro script. the likelihood of it occurring to the average user is pretty low, because it involves a "perfect storm", but i think it might be a symptom of some bigger design flaws regarding STI and querying.

it only happens if dm-validations is included, but i haven't yet figured out why.. i played a little w/ auto_validations=>false without any success.

Comments and changes to this ticket

  • Gary Yngve

    Gary Yngve January 14th, 2009 @ 11:16 AM

    to follow up, the child class doesn't have to have a belongs_to.. it can be ANY additional property.. revised script attached

  • Gary Yngve
  • Gary Yngve

    Gary Yngve January 14th, 2009 @ 11:22 AM

    upon further inspection, it looks like adding :auto_validation => false to the property in the child causes the script to pass, though I recall in some previous incarnation of the script, some combo of auto_validation => false was causing another crash.. possibly when I had self-referential models.. i'll post another ticket on that when i can make a solid repro

  • Dan Kubb (dkubb)

    Dan Kubb (dkubb) February 13th, 2009 @ 05:38 PM

    • State changed from “unconfirmed” to “resolved”

    This passes fine with dm-core 0.10.0. Marking as resolved.

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