Changeset [1f515cb71d491b42d86d32b22ede4e4a75c84322] by Dan Kubb

October 24th, 2009 @ 04:34 AM

Allow :attr.not => [] to match all records

  • Each operation and comparison now has a reference to it's parent so that we can determine if a specific comparison is negated. This allows a negated InclusionComparison with an empty Enumerable to match every record. It also allows it to be seen as valid, so that the query actually reaches the datastore.
  • Allow :attr.not => nil to work for attributes that do not allow nil values. Previously this would've been denied because the not-nullable Property would say that the nil is an invalid value.

[#1050 state:resolved]

Committed by Dan Kubb

  • M lib/dm-core/adapters/data_objects_adapter.rb
  • M lib/dm-core/associations/relationship.rb
  • M lib/dm-core/property.rb
  • M lib/dm-core/query/conditions/comparison.rb
  • M lib/dm-core/query/conditions/operation.rb
  • M lib/dm-core/spec/adapter_shared_spec.rb
New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »