Ted Han wrote: > D'oh, that's probably the english stemmer going wacky. > > Example of a normal case: Wives => Wife. > > So if your table name is Alternatives its looking for an Alternatif > class. You can specify the class name explicitly as Tze Yang Ng > pointed out. You should be able to configure the stemmer also to look > for the correct singular form of Alternatives as well, but i can't > remember how to do that off hand. > > Gimme a few and i'll try and find it
thanks - right on target. Under class Area I added "has n, :alternatives, :class_name => 'Alternative' that did the trick. I also added class name to the "belongs_to" but that gave me warnings so I left it off and it seems to work fine. Is there a DataMapper FAQ ? This might make a helpful comment. > > -Ted > > On Tue, Mar 31, 2009 at 8:17 PM, Miles <[email protected] > <mailto:[email protected]>> wrote: > > > I can't figure out what is wrong with a simple 1-many relationship - > Note error is saying "Alternatif" when the model has "Alternative". > Any ideas ? > > /usr/lib/ruby/gems/1.8/gems/dm-core-0.9.11/lib/dm-core/associations/ > relationship.rb:74:in `child_model': Cannot find the child_model > Alternatif for Area (NameError) > from /usr/lib/ruby/gems/1.8/gems/dm-core-0.9.11/lib/dm-core/ > associations/relationship.rb:15:in `child_key' > from /usr/lib/ruby/gems/1.8/gems/dm-core-0.9.11/lib/dm-core/ > model.rb:224:in `properties_with_subclasses' > from /usr/lib/ruby/gems/1.8/gems/dm-core-0.9.11/lib/dm-core/ > model.rb:224:in `each_value' > from /usr/lib/ruby/gems/1.8/gems/dm-core-0.9.11/lib/dm-core/ > model.rb:224:in `properties_with_subclasses' > from /usr/lib/ruby/1.8/set.rb:188:in `each' > from /usr/lib/ruby/1.8/set.rb:188:in `each_key' > from /usr/lib/ruby/1.8/set.rb:188:in `each' > from /usr/lib/ruby/gems/1.8/gems/dm-core-0.9.11/lib/dm-core/ > model.rb:223:in `properties_with_subclasses' > ... 14 levels... > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "DataMapper" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/datamapper?hl=en -~----------~----~----~----~------~----~------~--~---
