EPrints Technical Mailing List Archive
See the EPrints wiki for instructions on how to join this mailing list and related information.
Message: #00890
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
[EP-tech] Re: Patch: handle NULL values in EPrints::Search::Condition::Comparison
- To: eprints-tech@ecs.soton.ac.uk
- Subject: [EP-tech] Re: Patch: handle NULL values in EPrints::Search::Condition::Comparison
- From: Tim Brody <tdb2@ecs.soton.ac.uk>
- Date: Thu, 26 Jul 2012 14:32:50 +0100
On Tue, 2012-06-26 at 18:44 +0200, Alexander 'Leo' Bergolth wrote: > 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. I think the creators_name_given should contain "" instead of NULL, exactly to avoid this problem. There was an EPrints version that started writing NULLs but that was a bug. Otherwise, a search for "IS NULL" should be using EXact and will create an "IsNull" field condition? -- All the best, Tim
Attachment:
signature.asc
Description: This is a digitally signed message part
- References:
- [EP-tech] Patch: handle NULL values in EPrints::Search::Condition::Comparison
- From: "Alexander 'Leo' Bergolth" <leo@strike.wu.ac.at>
- [EP-tech] Patch: handle NULL values in EPrints::Search::Condition::Comparison
- Prev by Date: [EP-tech] Re: Patch: improve rendering names with empty givenname
- Next by Date: [EP-tech] Re: Create item's new version
- Previous by thread: [EP-tech] Patch: handle NULL values in EPrints::Search::Condition::Comparison
- Next by thread: [EP-tech] Re: Patch: handle NULL values in EPrints::Search::Condition::Comparison
- Index(es):