class-table-inheritance

Discovering the subclass of a row in the superclass table

I have a table of electronic devices that serves as a generic superclass and then separate subclass tables for phones, laptops, cameras, etc. that extend the superclass and give specific information on the device (using the foreign key deviceID from the superclass table), in other words, Class Table Inheritance. My question is, should I ...

Use both Class Table and Single Table inheritance in Castle Activerecord?

In Castle Activerecord (on top of NHibernate), is it possible to use class table inheritance globally, and single table inheritance on part of the inheritance tree? I would like to do something like /// <summary> /// Base class for models /// </summary> [ActiveRecord("model"), JoinedBase] public abstract class Model: ActiveRecordBase { ...

PHP doctrine 1.2 ORM - polymorphic queries with class table inheritance

I'm experimenting with the Doctrine ORM (v1.2) for PHP. I have defined a class "liquor", with two child classes "gin" and "whiskey". I am using concrete inheritance (class table inheritance in most literature) to map the classes to three seperate database tables. I am attempting to execute the following: $liquor_table = Doctrine_Core::...

Class Table Inheritance in Rails 3

I'm currently working on a Rails 3 application that looks like it might need to use Class Table Inheritance for a couple of models. A simplified example of what's going on is this. I have a class called Person with general attributes like name, email, password which are common to all types of people in the application and used for auth...