Hey Guys,

if I create two models like so:

 class Article
    include DataMapper::Resource

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

 and

 class Category
    include DataMapper::Resource

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

I end up with three tables Articles, Categories and Articles_Category.
Using Ruby, preferably Sinatra, what object would I need to create to
correctly insert the corresponding records into all three tables?,
Which is to say an article that belongs to a certain category

Thnx

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

Reply via email to