Hi again (so many Sequel experiments in my mind now ;)
I have been testing these two plugins:
* nested_attributes
* class_table_inheritance
in my Model. My hope was that nested_attributes managed CTI transparently, but
it seems not the case. Let's see what I have:
--------------------------------------
class Container < Sequel::Model
one_to_many :contents
end
class Content < Sequel::Model
plugin :class_table_inheritance
end
class CubicalContent < Content
end
class ConicalContent < Content
end
class SphericalContent < Content
end
-------------------------------------
With this model if I use nested attributes for creating with:
{contents_attributes:
[
{kind: 'CubicalContent', cubical_data: 'bla'},
{kind: 'ConicalContent', conical_data: 'ble'},
{kind: 'SphericalContent', spherical_data: 'bli'}
]
}
I get no specific class objects, but a collection of bare Content instances.
I know that this is a good deal of magic, but CTI is a great plugin for
quality modeling. If only we could use nested attributes for creating/updating
transparently without annoying corner cases, that would be great :)
What do you thing about it?
Thank you very much. Greets.
--
David
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.