[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[EP-tech] Patch: handle NULL values in EPrints::Search::Condition::Comparison
- Subject: [EP-tech] Patch: handle NULL values in EPrints::Search::Condition::Comparison
- From: leo at strike.wu.ac.at (Alexander 'Leo' Bergolth)
- Date: Tue, 26 Jun 2012 18:44:37 +0200
Hi!
The attached patch changes SQL output to use "IS" instead of "=" when
comparing for equality against undefined values.
This fixes a problem (at least with Oracle databases) when using views
to browse by creators that have an empty givenname. (The SQL that was
created contained something like
"EPRINT_CREATORS_NAME"."CREATORS_NAME_GIVEN" = NULL
... which will never match.
I believe it could also correct several other problems concerning empty
fields, however, I did only stumble across the browse view issue yet.
Cheers,
--leo
--
e-mail ::: Leo.Bergolth (at) wu.ac.at
fax ::: +43-1-31336-906050
location ::: IT-Services | Vienna University of Economics | Austria
-------------- next part --------------
A non-text attachment was scrubbed...
Name: eprints-3.2-compare-null.patch
Type: text/x-patch
Size: 1247 bytes
Desc: not available
Url : http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20120626/a4076ab8/attachment.bin