LauJensen / clojureql

ClojureQL is superior SQL integration for Clojure
https://clojureql.sabrecms.com
Eclipse Public License 1.0
285 stars 39 forks source link

weird replacement of substrings within predicates #75

Closed shyblower closed 12 years ago

shyblower commented 13 years ago

try this with current git code (2011-02-04): (select (table :tbl) (where (and (= :id 1) (= :valid_until nil)))) results in: SELECT tbl.* FROM tbl WHERE ((tbl.id = 1) AND (tbl.valtbl.id_until IS NULL)) expected: SELECT tbl.* FROM tbl WHERE ((tbl.id = 1) AND (tbl.valid_until IS NULL)) ...obvilously the substring 'id' within 'valid_until' gets erroneously replaced by the fully qualified tbl.id

bendlas commented 12 years ago

That seems to happen due to https://github.com/LauJensen/clojureql/blob/master/src/clojureql/predicates.clj#L118