Yes D Making belong_to fixed it. When I started out, I could not figure out how to do the belongs_to for these tables. It kept breaking. The tables are whacky, cause I am modeling an unusual legacy database I am working with. So thanks for tip. ~ D
On Feb 10, 1:13 pm, "Dan Kubb (dkubb)" <[email protected]> wrote: > > I was playing with datamapper and did something like this > > > Watcher.first.post > > > which works fine .. but this does not: > > > Post.first.watchers.first.post > > > Its not something I would do everyday, true, but it would make the > > library more robust if that worked, since that is expected behavior > > It's a bit hard to understand the model due to the naming of the > properties, but generally you pair has(1) and has(n) relationships > with belongs_to() relationships on the other side. > > -- > > Dan -- 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.
