[Nitro] Problem with Og enchantments.

Bryan Soto bryan.a.soto at gmail.com
Tue Apr 11 17:20:51 EDT 2006

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

/mnt/zip/nitro.glue-move/og/lib/og/entity.rb:514:in `method_missing':
undefined method `table' for TC_Join::ArticleToCategory:Class
        from /mnt/zip/nitro.glue-move/og/lib/og/relation/joins_many.rb:40:in
        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
        from /mnt/zip/nitro.glue-move/og/lib/og/manager.rb:233:in
        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

  class ArticleToCategory
    property :rate, Float
    property :hits, Fixnum
    has_one Article
    has_one Category

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?


"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