Hi list,

Please excuse me if this is actually not a problem as I am a bit new to 
both DataMapper and key-value data stores. However I am following the 
example code in the DataMapper Associations documentation 
(http://datamapper.org/docs/associations.html) for creating a Twitter-like 
follower => followed self-referential association in my User model.

I'm runnning:

Rails 3.1.3
DataMapper 1.2.0
dm-rails 1.2.0
dm-redis-adapter 0.5.1 

Redis is my data store (2.2.5)

This pastie should help illustrate the problem: http://pastie.org/2943832

As you can see, when the association is first created, user1 ends up 
following himself along with the user he was intended to follow, user2 
believes she has one follower, but can't seem to find any 
links_to_followers. Furthermore, unfollowing seems to leave an orphan 
association on the followed user's side of the association, and generally 
seems to make a mess of things.

Perhaps the association isn't being stored in/queried from Redis properly, 
or it simply isn't possible to store such a relationship in a key value 
store?

I would be grateful for any help or advice.

-- 
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/datamapper/-/2xJXPi7LXLgJ.
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.

Reply via email to