[DataMapper] DataMapper 0.10.1 association problem

2009-12-01 Thread Somebody
Hello there :) I am currently working on migrate from DM 0.9.x to 0.10.1 and now i have problem... I'll be grateful for the help http://gist.github.com/246333 Problem that DM generate next SQL: SELECT users.id, users.name FROM users INNER JOIN friendships ON users.id = friendships.friend_id

[DataMapper] reg Datamapper Relationship chain error

2009-12-01 Thread sankar
hi, i got the following error while update records, Please help me why i got this error and also i attach my sample code in bottom of error message. /usr/lib/ruby/gems/1.8/gems/dm-core-0.9.11/lib/dm-core/associations/ one_to_many.rb:302:in `save_resource': undefined method `attach_parent' for

Re: [DataMapper] DataMapper 0.10.1 association problem

2009-12-01 Thread Martin Gamsjaeger
The 0.10.x series doesn't yet support self referential many to many relationships. You can have a look at http://github.com/snusnu/dm-is-self_referential which provides a temporary workaround. You don't get all the stuff fully supported SRMTM relationships would give you, but it's better than

Re: [DataMapper] reg Datamapper Relationship chain error

2009-12-01 Thread Martin Gamsjaeger
I don't know much about dm-0.9.11 but this looks like it should work with the 0.10.x series. If that's an option for you, you could try to upgrade to either dm-0.10.1 (which is available as a gem), or even better, upgrade to the latest code from git repositories. You can have a look at

Re: [DataMapper] reg Datamapper Relationship chain error

2009-12-01 Thread sankaranarayanan e
hi, it works fine in version 0.10.1, but i have used dm-sweatshop for fixtures, i got undefined method error `cattr_accessor' in dm-sweatshop/lib/dm-sweatshop/unique.rb line no: 66 Thanks Regards Sankaranarayanan .E On Wed, Dec 2, 2009 at 4:40 AM, Martin Gamsjaeger gamsnj...@gmail.comwrote:

[DataMapper] Re: reg Datamapper Relationship chain error

2009-12-01 Thread MarkMT
I believe the implementation that merb datamapper use is contained in extlib. On Dec 2, 12:05 am, Jordan Ritter jordan.rit...@gmail.com wrote: cattr_accessor is a rails/activesupport-provided method, AFAIK.  seems odd that dm-sweatshop would incur such a dependency. cheers, --jordan On