Skip to content

Instantly share code, notes, and snippets.

@keeran
Created February 17, 2009 14:25
Show Gist options
  • Select an option

  • Save keeran/65757 to your computer and use it in GitHub Desktop.

Select an option

Save keeran/65757 to your computer and use it in GitHub Desktop.
class Item
include DataMapper::Resource
has n, :cat_as, :through => Resource
has n, :cat_bs, :through => Resource
end
class CatA
include DataMapper::Resource
has n, :items, :through => Resource
end
class CatB
include DataMapper::Resource
has n, :items, :through => Resource
end
# need to find all items for a given CatA & CatB id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment