[Nitro] Schema Inheritance

zimba-tm zimba.tm at gmail.com
Tue Nov 29 17:43:58 EST 2005


In your example, you use AA.new. It creates a new object but it isn't
available in the storage yet.
Try addind A.save or use A.create like George did

On 29/11/05, Emmanuel Piperakis <epiperak at softlab.ece.ntua.gr> wrote:
> You forgot to include the
> schema_inheritance in class A
> if you do not, there is not magic! Og, creates 1 table per subclass,
> (nothing new here). With the schema_inheritance line, the problem occurs.
>
> > Your code is wrong, I runned the following with no problem:
> >
> > require 'og'
> >
> > class A
> >   property :koko, String
> > end
> >
> > class AA < A
> >  property :haha, String
> > end
> >
> > Og.start
> >
> > a = A.create
> > aa = AA.create
> >
> > oid = 1
> > b = A[oid]  # no problem
> >
> >
> > am I missing something?
> >
> > -.g
> >
> >
> > --
> > http://www.gmosx.com
> > http://www.navel.gr
> > http://www.nitrohq.com
> >
> > _______________________________________________
> > Nitro-general mailing list
> > Nitro-general at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/nitro-general
> >
>
> Emmanouil Piperakis (epiperak at cs.ntua.gr)
> {To explore is Human, to Create is Devine,
>   To teach is Primal, to Rule is Sin}
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
>


--
Cheers,
  zimba

http://zimba.oree.ch




More information about the Nitro-general mailing list