[Nitro] Schema Inheritance

Emmanuel Piperakis epiperak at softlab.ece.ntua.gr
Sun Nov 27 23:41:03 EST 2005


> I have a small problem to report.
> class A
>  property :koko, String
schema_inheritance #forgot this line
> 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
>

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