#1466 new
kmarcisz

Many-to-many association

Reported by kmarcisz | January 4th, 2011 @ 05:02 PM

When having many to many association when accessing values it works only when used in alphabetical order
Example:

class User
include DataMapper::Resource

property :id, Serial has n, :songs, :through => Resource end

class Song
include DataMapper::Resource

property :id, Serial

has n, :users, :through => Resource end

This is fine
song = Song.get(1)
puts song.users

This is raising error
user = User.get(1)
puts user.songs

No comments found

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket

Pages