[Nitro] Og 1-n relation alias bug

John Lloyd-Jones john.lloydjones at gmail.com
Sun Aug 14 11:31:20 EDT 2005


This is another variant of the same bug that Andrew and I have
reported earlier. We both receievd "NoMethodError: undefined method
`xxx_oid=" messages. In our cases, the bug was triggered by our
inheritance relationships. The root cause is the failure to use the
correct foreign_key value. I will check to see if setting foriegn_name
helps (I had been experimenting with fudging it in the has_many.rb
file)


On 8/14/05, George Moschovitis <george.moschovitis at gmail.com> wrote:
> Hello Kristof,
> 
> thanks for the report, here is a workaround till this situation is improved:
> 
> class Book
>         property :title
>         belongs_to :owner, Person # this creates a problem?
> end
> 
> class Person
>         property :name, Og::VarChar(128)
>         has_many :books, Book, :foreign_name => :owner
> end
> 
> > George, while you're into it, please try to delete any of the plain
> > ..
> > NoMethodError: undefined method `store' for nil:NilClass
> 
> Well you cannot create an opject w/o properties. Perhaps a better
> error message is needed though.
> 
> regards,
> George.
> --
> 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
>




More information about the Nitro-general mailing list