El miércoles 27 de agosto, Jeremy Evans escribió:
> I don't think you'll be able to get that to work.  With CTI, 
> Superclass.new(:kind=>'Subclass') gives you an instance of Superclass, not 
> Subclass.

I have seen code and that behaviour is correct. Only posible solution would be
that nested_attributes knew of CTI and search for specific :kind in data before
trying to create instance.

> Personally, I think CTI is a bad pattern for modeling.  Favor 
> composition/associations over inheritance.  Attempting to emulate 
> inheritance in the database using multiple tables is a bad idea, IMO.  I 
> wrote the CTI plugin to show that Sequel can handle it, not because it is a 
> good pattern to use.

In your opinion, what should be good strategy for my previous message example?

Thanks.

-- 
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.

Reply via email to