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

Enable ORM to accept attributes named 'length' #87

Merged
merged 1 commit into from
May 11, 2018

Conversation

danielsharvey
Copy link
Contributor

Replace _.each() with _.forIn() to enable ORM to accept attributes named 'length'.

See balderdashy/sails#4353

Replace `_.each()` with `_.forIn()` to enable ORM to accept attributes named 'length'.

See balderdashy/sails#4353
@@ -44,7 +44,7 @@ module.exports = function detectChildrenRecords(primaryKeyAttr, records) {

// Process each key in the record and build up a child record that can
// then be nested into the parent.
_.each(record, function checkForChildren(val, key) {
_.forIn(record, function checkForChildren(val, key) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For posterity:
image

@mikermcneil mikermcneil merged commit 9486b92 into sailshq:master May 11, 2018
@mikermcneil
Copy link
Member

@danielsharvey thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants