single list estate issues


i have following 3 rails classes, stored table, controlling rails' unparalleled list inheritance.



class template < activerecord::base
class thingtemplate < template
class stockthingtemplate < thingtemplate


if i have stockthingtemplate id 150 following i should logically means this:



thingtemplate.find(150)
=> #returns me stockthingtemplate


and fact works, sometimes



when works, generates following sql query:



select * templates where (templates.`id` = 159) ( (templates.`type` = 'thingtemplate') (templates.`type` = 'stockthingtemplate' ) )


when doesn't work, generates following sql query:



select * templates where (templates.`id` = 159) ( (templates.`type` = 'thingtemplate') )


the sql doing ostensible to, nonetheless doubt is, since generating set sql time, opposite set another time. it's literally accurate same code.



notes:




  • i'm rails 1.2

  • i've already attempted require 'stock_thing_template' several places. presumably effect, causes problems



Comments

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?