
conditions array with marshaled object types
Reported by Myke Cameron | July 3rd, 2008 @ 09:05 AM
This bug was first noticed when running dm-core 0.9.1. It persisted through an upgrade to 0.9.2 and continued when we upgraded to edge.
In short, it appears that when you try to find records from a model that utilizes the Object property type using the :conditions parameter, it does not include the conditions specified when it generates the sequel query. Ex:
MyModel.all(:conditions => ['number IS NULL OR number <= ?', 25]) # Produces the same sequel query as MyModel.all()
MyModel.all(:number => nil) # This works fine but doesn't help if you need an OR
While trying to sort this out we discovered it worked in some models and not others, and discovered that removing any properties using the Object type would solve the problem.
Comments and changes to this ticket
-
Myke Cameron July 3rd, 2008 @ 05:32 PM
Turns out this was all due to naming a property :conditions. It would be nice if it threw an exception in that situation.
-
Jonathan Stott (namelessjon) November 30th, 2008 @ 08:16 AM
- State changed from new to invalid
- Assigned user cleared.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
People watching this ticket
- Nobody is watching this ticket.