[Nitro] Schema Inheritance

Emmanuel Piperakis epiperak at softlab.ece.ntua.gr
Wed Nov 30 04:37:37 EST 2005


In my real code, the object has been created successfully and saved. I try 
to query much later in the code.


> 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
>
> _______________________________________________
> 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}



More information about the Nitro-general mailing list