[Nitro] Problem with Og enchantments.

Bryan Soto bryan.a.soto at gmail.com
Wed Apr 12 01:00:02 EDT 2006


And just for fun, the test suite that failed on Linux ran fine on
Windows. No changes. I'll be sending the patch as I'm curious if
anyone else has problems with it.

On 4/11/06, Bryan Soto <bryan.a.soto at gmail.com> wrote:
> I started with the Glue removal by moving the validations to Og.
> Before the move, I had one failure (a test for memcached). After the
> move, the tests consistently refuse to run with the following error
> message:
>
> /mnt/zip/nitro.glue-move/og/lib/og/entity.rb:514:in `method_missing':
> undefined method `table' for TC_Join::ArticleToCategory:Class
> (NoMethodError)
>         from /mnt/zip/nitro.glue-move/og/lib/og/relation/joins_many.rb:40:in
> `enchant'
>         from /mnt/zip/nitro.glue-move/og/lib/og/relation.rb:246:in `enchant'
>         from /mnt/zip/nitro.glue-move/og/lib/og/relation.rb:244:in `enchant'
>         from /mnt/zip/nitro.glue-move/og/lib/og/manager.rb:158:in `manage'
>         from /mnt/zip/nitro.glue-move/og/lib/og/manager.rb:233:in
> `manage_classes'
>         from /mnt/zip/nitro.glue-move/og/lib/og/manager.rb:233:in
> `manage_classes'
>         from ./test/og/tc_join.rb:46
>         from /usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader.rb:5
>         from /usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader.rb:5
>
> If I run that test case by itself, it passes. The test case looks like
> this (remeber this test passed before):
>
> =begin tc_join.rb
>   class Article
>     property :title, String
>
>     joins_many :first_join, Category, :through => ArticleToCategory
>     joins_many :second_join, Category, :through => ArticleToCategory
>     joins_many :third_join, Category, :table => :ogj_article_category_third
>     joins_many :fourth_join, Category, :table => :ogj_article_category_fourth
>     joins_many Category
>
>     def initialize(title)
>       @title = title
>     end
>   end
>
>   class ArticleToCategory
>     property :rate, Float
>     property :hits, Fixnum
>     has_one Article
>     has_one Category
>   end
> =end
>
> If I move the definition of ArticleToCategory to before Article, the
> tests again pass.
>
> Maybe we should hold off on the glue move and concentrate on the
> enchantments? Perhaps, George, that problem you ran into when trying
> to optimize Og startup was a real problem?
>
> Bryan
>
> --
> "Never tell people how to do things. Tell them what to do and they
> will surprise you with their ingenuity." —General George S. Patton
>


--
"Never tell people how to do things. Tell them what to do and they
will surprise you with their ingenuity." —General George S. Patton




More information about the Nitro-general mailing list