Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL left joins behave as inner joins #1563

Open
mapkyca opened this issue Oct 23, 2016 · 0 comments
Open

SQL left joins behave as inner joins #1563

mapkyca opened this issue Oct 23, 2016 · 0 comments
Labels

Comments

@mapkyca
Copy link
Member

mapkyca commented Oct 23, 2016

While trying to do this:

Filter based on publish_status, e.g.

$search['publish_status']['$not'] = 'draft';

I encountered this error:

Entities with no metadata value set for publish_status are not returned, despite a left join value for this field should be 'NULL'.

The key needs to be present for each object for it to display, even if an unset value should evaluate to NULL, i.e. not 'draft'

Some other notes:

I suspect this is an artefact caused by joining on a name/value key table, and as a result I can't see a way round it short of rewriting getRecords from the ground up. Mind you, I'm not an SQL expert.

@mapkyca mapkyca changed the title Mysql left joins behave as inner joins SQL left joins behave as inner joins Oct 23, 2016
@mapkyca mapkyca added the Bug label Oct 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant