[storm] subclassing and foreign keys with respect to properties from parent
James Henstridge
james at jamesh.id.au
Wed Aug 13 05:14:41 BST 2008
On Wed, Aug 13, 2008 at 11:10 AM, lv yi <lvscar at gmail.com> wrote:
> On Wed, Aug 13, 2008 at 10:00 AM, James Henstridge <james at jamesh.id.au> wrote:
>> Storm does not use subclassing to create foreign key relationships.
>> What that part of the tutorial is doing is saying "the employee table
>> shares the same field definitions as the person table, plus these
>> extra ones". There is no person record created when you add a record
>> to the employee table.
>
> I have used postgreSQL table inheritance with Storm subclassing. the
> experience is not bad.
> you can try it.
That is certainly a possibility, but it isn't what the tutorial was
trying to demonstrate.
If you do use postgres table inheritance with Storm, be careful about
having two representations for the same table around at the same time
though (e.g. Person and Employee objects that represent the same row).
Changes made on one will not be reflected in the others unless you
invalidate() them.
This is similar to the issues of using triggers to modify data or
editable views.
James.
More information about the storm
mailing list