[wp-trac] [WordPress Trac] #23268: NOT EXISTS meta query with OR relation
WordPress Trac
noreply at wordpress.org
Mon Oct 14 06:07:26 UTC 2013
#23268: NOT EXISTS meta query with OR relation
----------------------------------------+-----------------------------
Reporter: timfield | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Query | Version: 3.5
Severity: normal | Resolution:
Keywords: has-patch needs-unit-tests |
----------------------------------------+-----------------------------
Comment (by sboisvert):
I just made a change to the codex since it implied that this effected
EXIST as well as NOT EXIST. This doesn't seem to be the case on 3.6.1.
If you put in a value of any kind when using EXIST you get the behaviour
of "=" not the behaviour defined previously defined as being the behaviour
of the bug that affects NOT EXISTS.
so to clarify on 3.6.1
this:
{{{
array(
'key' => 'disclosure_regular_travel',
'compare' => 'EXISTS'
),
}}}
works as expected.
While the following:
{{{
array(
'key' => 'disclosure_regular_travel',
'value' => 'non empty value',
'compare' => 'EXISTS'
),
}}}
Causes behaviour similar to "=" compare. (Which is not in itself bad, just
not what was written up in the codex and referenced this bug report)
--
Ticket URL: <http://core.trac.wordpress.org/ticket/23268#comment:14>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list