[Nitro] schema_inheritance

Emmanuel Piperakis epiperak at softlab.ece.ntua.gr
Sun Dec 25 20:04:32 EST 2005


> On the Og implementation side though I do find it kind of interesting,
> even a bit unexpected, of the way to do that, i.e. using a superclass
> to create the union. But I guess it actually makes good sense.
>
> But why not call is union_inheritance instead? That seems more
> intuitive. Perhaps evn better, would a mixin, or a superclass, be more
> appropriate here? Eg.
>
>  class Project
>    is Union
>    property :xmas, String
>  end
>
I do not fully understand what "is Union" does. Is Union my superclass? 
Do I have to say something like too?

class ForeignProject
  is Union
  property :santa, String
end

Could I still query for all Projects and get both Foreign and Domestic? Do 
Foreign and Domestic share primary keys?

>
>  class Project < Union
>    property :xmas, String
>  end

Here again I do not understand what Union is. Is it a ruby class? Sorry, I 
am not an expert...

> Also, what's the reason for the field names to be prefixed by 'og'?
That is my bad... I was influenced by the naming of the tables, and 
thought for a moment that the column names were prefixed bye 'og'


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