Skip to content

Avoid loading belongsTo relations with falsey ids #51

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

Closed
wants to merge 1 commit into from
Closed

Avoid loading belongsTo relations with falsey ids #51

wants to merge 1 commit into from

Conversation

robertdp
Copy link

No description provided.

@jmdobry
Copy link
Member

jmdobry commented Jan 18, 2016

Should it be a falsey check? Or check for undefined instead?

@jmdobry
Copy link
Member

jmdobry commented Jan 18, 2016

Also, I think pull requests are supposed to go to the develop branch.

@robertdp
Copy link
Author

With SQL, local keys for optional relations will most likely be null, not undefined, which results in the query:

SELECT * FROM table WHERE id = ''

pull requests are supposed to go to the develop branch

Ah, okay. I can make that change if necessary.

@robertdp
Copy link
Author

Also, the falsey check is already being used for the other relation types, just not belongsTo. Which is why only optional belongsTo relations are causing Not Found! errors to be thrown unnecessarily all over my app.

@robertdp
Copy link
Author

Moved to #52

@robertdp robertdp closed this Jan 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants