[Nitro] Schema Inheritance

George Moschovitis george.moschovitis at gmail.com
Tue Nov 29 05:28:41 EST 2005


On 11/28/05, Emmanuel Piperakis <epiperak at softlab.ece.ntua.gr> wrote:
> Hi,
> I have a small problem to report.
> class A
>   property :koko, String
> end
>
> class AA < A
>   property :haha, String
> end
>
> a = AA.new
> b = A[oid] #Fails
>
> undefined method `result' for #<Array:0x407d26e0>
>
> /usr/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/store/sql.rb:955:in
> `read_one'
> /usr/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/store/sql.rb:426:in
> `find_one'
> /usr/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/entity.rb:127:in `find_one'
> ./src/controller.rb:82:in `project_sel'
> (eval):12:in `project_sel_action'
>
>
> probably something to do with the following line in sql.rb
> Any ideas?
>
> ps. b = A.find(:condition => "oid =#{oid}")[0]
> works find... but...it is toooo long
>
>      klass =
> Og::Entity::entity_from_string(res_row.result.flatten[res_row.fieldnum('ogtype')])
> if klass.schema_inheritance?
>
> 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
>


--
http://www.gmosx.com
http://www.navel.gr
http://www.nitrohq.com




More information about the Nitro-general mailing list