Alright, many thanks! So, the top model specifies everything about all its
children and their children and so on in the table_map and the remainder is
done via the subclass relation. Then, it's clear to me now.
Oh, and one last thing: You're doing an amazing job on Sequel! :)
On Sunday, 17 September 2017 20:32:24 UTC+2, Jeremy Evans wrote:
>
> On Sunday, September 17, 2017 at 8:51:48 AM UTC-7, Eugen K wrote:
>>
>> Thanks, I took a closer look at the table_map option and the remainder of
>> the CTI documentation, but a few things are still not clear to me.
>>
>> 1) Does the `Manager` model load the `class_table_inheritance` plugin,
>> too (since it's also a superclass using CTI)? If so, does it need `key`
>> different from the `key` in the `Employee` model?
>>
>
> No. Only the primary class loads the plugin, it should not be loaded in
> subclasses. Also, it's not supported for the key to be different in
> subclasses. It wouldn't make a lot of sense, since the key should be in
> the parent class's table.
>
>
>> 2) Do the models `Staff` and `Executive` load the
>> `single_table_inheritance` plugin? If so, what about their `key?
>>
>
> No. See previous answer.
>
>
>> And on a side note: There's a typo (double colon) in the usage code:
>>
>> # Specifying the tables with a :table_map hash
>> Employee.plugin :class_table_inheritance,
>> table_map: {...
>> CEO: ::executives }
>>
>>
>>
> That typo was fixed earlier this morning. :)
>
> Thanks,
> Jeremy
>
--
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 https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.