datamapper/dm-types — Issue #52: ParanoidBoolean causes issues with belongs_to Relationships
Author: pnomolos
Created: 2011-12-22 23:18:37+00:00
State: open

class Car
include DataMapper::Resource
has n, :wheels
property :id, Serial
property :deleted, ParanoidBoolean, :default => false, :lazy => false
end

If :lazy is set to true, Wheel.car will return nil even if a record exists (it even queries the DB successfully).

See https://gist.github.com/1511964 for a fuller use-case