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)
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.