Open solnic opened 13 years ago
The YAML and In-Memory adapters (which share the same query logic) do not work with many to many relationships yet.
This is something I am deeply aware of, and am planning to resolve within the next month or so.
by Dan Kubb (dkubb)
:+1: for getting this resolved in the next month or so :smirk:
I assume (from experimentation and the comment above) that this issue has been resolved. Is this correct?
Anonymous associations don't seem to be working properly with the YAML adapter.
require 'rubygems' require 'dm-core' DataMapper.setup(:default, "yaml:db")
class Burger include DataMapper::Resource
end
class Condiment include DataMapper::Resource
end
burger = Burger.create(:name => "Double Cheeseburger")
cheese = Condiment.create(:name => "Cheese")
burger.toppings << cheese burger.extras << Condiment.create(:name => 'Bacon') burger.save
puts "burger toppings: #{burger.toppings}" puts "burger extras: #{burger.extras}" burger.reload puts "burger toppings: #{burger.toppings}" puts "burger extras: #{burger.extras}"
josh@phenom:~/test$ ruby problem.rb burger toppings: Cheese burger extras: Bacon burger toppings: burger extras:
Created by JHStatewide - 2009-11-15 19:16:08 UTC
Original Lighthouse ticket: http://datamapper.lighthouseapp.com/projects/20609/tickets/1125