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.
Activity
Charles Oliver Nutter
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Fix Version/s | JRuby 1.1.5 [ 14528 ] |
Thomas E Enebo
made changes -
| Summary | Allow select/delete/update conditions with comparison to NULL using '=' | [Derby] Allow select/delete/update conditions with comparison to NULL using '=' |
Thomas E Enebo
made changes -
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Fix Version/s | ActiveRecord-JDBC-0.9.1 [ 14819 ] | |
| Resolution | Fixed [ 1 ] | |
| Assignee | Thomas E Enebo [ enebo ] |
Charles Oliver Nutter
made changes -
| Status | Resolved [ 5 ] | Closed [ 6 ] |
Thomas E Enebo
made changes -
| Component/s | ActiveRecord-JDBC [ 12786 ] |
Thomas E Enebo
made changes -
| Fix Version/s | ActiveRecord-JDBC-0.9.1 [ 14819 ] |