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

Fix the null field issue responses CONCAT(NULL, ...) #34

Closed
MrSwitch opened this issue Mar 16, 2018 · 0 comments
Closed

Fix the null field issue responses CONCAT(NULL, ...) #34

MrSwitch opened this issue Mar 16, 2018 · 0 comments
Labels

Comments

@MrSwitch
Copy link
Member

MrSwitch commented Mar 16, 2018

For one to many relationships puts the fields from the many table into a CONCAT, i.e...

{ 
    one_id,
    many: {
        many_id, 
        could_be_null_field
    }
}

// Results in...
// ... GROUP_CONCAT(CONCAT(many_id, could_be_null_field))...

Which if could_be_null_field is null the whole row will be excluded.

CONCAT() returns NULL if any argument is NULL.

https://dev.mysql.com/doc/refman/5.7/en/string-functions.html#function_concat

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