I've attached an admittedly sloppy workaround patch which fixes mito:find-dao for me. Sloppy in the sense that I'm not 100% sure that it will do the right thing in more complex contexts.
(Somehow github doesn't like the .patch extension today, so here is a txt with the patch.)
Hi,
something like this
(mito:find-dao 'thing :text text :whatever :null)
produces SQL like
;; SELECT * FROM
thingWHERE ((
text= ?) AND (
whatever= NULL)) LIMIT 1 ("Etc")
which does not find the element where text="Etc" and the field "whatever" is NULL. The SQL that does this is
;; SELECT * FROM
thingWHERE ((
text= ?) AND (
whateverIS NULL)) LIMIT 1 ("Etc")
("IS NULL" instead of "= NULL").
I've attached an admittedly sloppy workaround patch which fixes mito:find-dao for me. Sloppy in the sense that I'm not 100% sure that it will do the right thing in more complex contexts.
(Somehow github doesn't like the .patch extension today, so here is a txt with the patch.)
daonull.txt
Regards, and thanks,
Mario
PS: The variant
(mito:find-dao 'thing :text text :whatever NIL)
raises an error in the original, but works with this patch.