Displaying 1 result from an estimated 1 matches for "fotoentry".
Did you mean:
bootentry
2006 Apr 07
1
how to map one-to-one relation to two tables
hi. iv got a problem with one-to-one relation with AR. let''s say I need
this classes:
class ContentObject < ActiveRecord::Base
class BlogEntry < ContentObject
class FotoEntry < ContentObject
i.e. Blog and Foto entries must extend ContentObject. Also they must be
mapped to separate tables. I can not figure out how to map this kind of
association better?
The most dumb and straitforward way is actually NOT to extend
ContentObject and associate it as regular has-one...