[prev] [thread] [next] [Date index for 2004/07/27]
I am using Postgresql 7.3.4-53 on SuSE 9.0 with Perl 5.8.1-81 (multithread 586 build) , DBI 1.43 (bundle v11.03), Ima::DBI 0.33, Class::DBI 0.96, DBD::Pg 0.33 (from CVS 7/26). Postgresql supports inheritance (so they claim it is 'object oriented' but I don't see much polymorphism ) . I have come up with a databas which uses this. It is a multimdedia website managemnt system. If you have a Subject , it has some attributes including name. A(this would be presumably a 'thing' or perhaps a place...or those might be further refined but in any case...). The primary key is subject_id , a sequence . Then we have a Person, which is a kind of a subject so it inherits from Subject and adds attributes of its own. This relationshp, isa, is modeled in the sql and in the Perl classes for CDBI. Create works in that I get the record in the database just fine. the trouble is that the created Person object has no values for any Subject columns . If $person is a Tables::Person and that has a use base Tables::Subject which in turn use base Table (which is the cdbi base class) I do not have a value for $person->name even though I set it and its in the database when I go to psql and SELECT * FROM persons; I have tried an explict retrieve to no avail.
inheritance in table classes
|
Generated at 11:34 on 01 Dec 2004 by mariachi v0.52