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

Add support for mongoDb id's + make collection to lowercase work #56

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

stuk88
Copy link
Contributor

@stuk88 stuk88 commented Aug 16, 2017

No description provided.

index.js Outdated
@@ -71,6 +71,9 @@ Barrels.prototype.associate = function(collections, done) {
Model.findOne(that.idMap[modelName][itemIndex]).exec(function(err, model) {
if (err)
return nextItem(err);

if(!model)
Copy link
Owner

Choose a reason for hiding this comment

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

Space missing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

what space?

Copy link
Owner

Choose a reason for hiding this comment

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

Space after if. It's really not a big deal, but let's stay consistent.

index.js Outdated
else {
for (var j = 0; j < item[attr].length; j++) {
model[attr].add(that.idMap[joined][item[attr][j]-1]);
var idx = that.idMap[joined].indexOf(item[attr][j]);
Copy link
Owner

Choose a reason for hiding this comment

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

Indentation, please.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

package.json Outdated
@@ -1,6 +1,6 @@
{
"name": "barrels",
"version": "1.6.5",
"version": "1.6.7",
Copy link
Owner

Choose a reason for hiding this comment

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

Why are you skipping a version? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

made changes twice, so upped the version twice. downgraded the version on my code now, so it will be upped only once on your side.

stuk88 added 7 commits August 27, 2017 04:16
Assosiations functions update + Populate function update to use find function, and add a checkes for array of ids have related objects, and not fail.
switching to !isNaN
@stuk88
Copy link
Contributor Author

stuk88 commented Sep 10, 2017

All Updated. Ready to pull.

@stuk88 stuk88 changed the title Add support for mongoDb id's Add support for mongoDb id's + make collection to lowercase work Feb 14, 2018
@stuk88
Copy link
Contributor Author

stuk88 commented Mar 5, 2018

Any update?

@bredikhin
Copy link
Owner

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