Mark Stanton wrote:
Yes - that's what I mean - basically class table inheritance. We are
using a bunch of these. Will have a think about how this could work -
but off the top of my head having methods from the base record mixed
into the other record would seem to do it.
So if you have a Shape record and a Triangle record - all of Shape's
methods would be available directly from Triangle.
We do this a lot too.
We have a table with base-attributes that are available for several
classes of objects, and then add-on tables for those that are only
available for a certain subclass of object.
For example, we migth have a "person" object, and two subclasses
"teacher" and "student".
The properties common to all persons would be stored in the
database-table "person", and only those fields that are specific to
students or teachers would be stored in their own tables.
This currently with reactor leads to a lot of code like:
teacherrecord.getPerson().getName()
studentrecord.getPerson().getAdress()
Suggestion:
When there is a one-to-one relation between two tables i.e. teacher
<hasone person>, make it possible to access all methods of the
person-record directly from a teacherobject.
Perhaps:
<object teacher>
<extends person />
</object>
Or some such, would make it possible to directly do:
teacherrecord.getName() (where name is a field defined on person, not on
teacher)
If the teacherrecord *DOES* have a name-field, this should offcourse
override the one in the person-record as elsewhere with inheritance.
Eivind Kjørstad
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --