Skip to content

Fixes broken select on find with populates#466

Open
luislobo wants to merge 1 commit into
balderdashy:0.12.xfrom
PetroCloud:fix-select-on-find-populate
Open

Fixes broken select on find with populates#466
luislobo wants to merge 1 commit into
balderdashy:0.12.xfrom
PetroCloud:fix-select-on-find-populate

Conversation

@luislobo

Copy link
Copy Markdown
Contributor

I know 0.12.x is not being "worked on", but just in case anyone else is having the same issue, I'm posting it here as a PR.

So, fixes situation where Pet will return all attributes, even though you only select 'name'. Just for reference: SELECT only works on sails-mongo in 0.12.x.

Pet.find({select:['name']}).populate('owner').find().exec(console.log)

Related to
#292

@mikermcneil

Copy link
Copy Markdown
Member

@luislobo thanks Luis!

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