[Nitro] schema_inheritance
Emmanuel Piperakis
epiperak at softlab.ece.ntua.gr
Sun Dec 25 12:00:23 EST 2005
Trans,
what it does is,
in the case of subclasses if in the superclass you include the line
schema_inheritance Og create 1 table for all the subclasses and puts the
UNION of all properties in this table + one new column called ogtype that
distinguishes the subclass by holding the .class of the subclass (aka the
name of the Subclass). If schema inheritance is not used then each class
and subclass has its own table.
eg. (to use the same example)
class Project
property :xmas, String
schema_inheritance
end
class ForeignProject < Project
property :gift, String
end
class DomesticProject < Project
property :santa, String
end
Og creates one table with the following columns (at least for version 0.25
and NOT for 0.26)
ogtype
ogxmas
oggift
ogsanta
oid
schema_inheritance is necessary for certain kind of queries... do not ask
me not to use it as a solution... ;-)
Thanks for your patience...
Emmanouil Piperakis (epiperak at cs.ntua.gr)
{To explore is Human, to Create is Devine,
To teach is Primal, to Rule is Sin}
More information about the Nitro-general
mailing list