Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.1.4
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Environment:Fedora Linux 9, Sun Java 1.6.0_07, JRuby 1.1.4, ActiveRecord-jdbc-adapter 0.8.2, activerecord 2.1.1
-
Testcase included:yes
-
Patch Submitted:Yes
-
Number of attachments :
Description
When using conditions with parameters like
Entry.find(:all, :conditions => ['title = ?', my_expression])
the resulting SQL statement fails on DerbyDB (JavaDB) if the given parameter computes til nil since DerbyDB does not allow comparison with NULL using the equals operator. DerbyDB demands using "IS NULL" when comparing to NULL.
I have attached a patch with test that allows most uses to succeed.
Please review and comment.