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

idGeneration is MONGO #12

Closed
mitar opened this issue Jul 8, 2014 · 12 comments
Closed

idGeneration is MONGO #12

mitar opened this issue Jul 8, 2014 · 12 comments

Comments

@mitar
Copy link
Collaborator

mitar commented Jul 8, 2014

Is there a reason why idGeneration has to be MONGO? I use random strings everywhere and would like to use it for this collection as well. Could this be part of options?

@mitar
Copy link
Collaborator Author

mitar commented Jul 8, 2014

Would you be open for a pull request for this?

And do you object of adding underscore as a dependency?

@vsivsi
Copy link
Owner

vsivsi commented Jul 8, 2014

I'm in the habit of using mongo style ids because fileCollection (my other main package) requires them for external gridFS compatibility, but there's no reason they have to be used here. If you've already done the work, I'll consider a PR, although I can probably add this quickly if you haven't done it already (including docs).

On underscore, I'd prefer to keep deps to a minimum, and given that I'm using CoffeeScript, many (but certainly not all) uses of underscore have an equivalent idiom in CS.

@mitar
Copy link
Collaborator Author

mitar commented Jul 8, 2014

I have not done anything yet. So if you would like to do it quickly, this would be awesome. :-)

@mitar
Copy link
Collaborator Author

mitar commented Jul 8, 2014

I am also using CoffeeScript in my project (https://github.com/peerlibrary/peerlibrary), but underscore still has a place. For example, this line could be written as unless _.isArray ids.

@vsivsi
Copy link
Owner

vsivsi commented Jul 8, 2014

Actually its a bit more work than my initial guess because I have tons of method match checks for Meteor.Collection.ObjectID. I need to think on this a bit, it's probably not too bad but definitely more than the three lines I imagined.

On underscore... true, but I've been burned by some incredibly stupid shit in underscore: jashkenas/underscore#1590 (comment)

@mitar
Copy link
Collaborator Author

mitar commented Jul 8, 2014

Actually its a bit more work than my initial guess because I have tons of method match checks for Meteor.Collection.ObjectID. I need to think on this a bit, it's probably not too bad but definitely more than the three lines I imagined.

Yes, you will probably have to create few helper methods and then replace code with them everywhere.

On underscore... true, but I've been burned by some incredibly stupid shit in underscore:

:-)

@vsivsi
Copy link
Owner

vsivsi commented Jul 8, 2014

It's getting late, I'll do this in the morning.

@vsivsi
Copy link
Owner

vsivsi commented Jul 8, 2014

@mitar
Copy link
Collaborator Author

mitar commented Jul 8, 2014

Great! Thanks! :-)

@vsivsi
Copy link
Owner

vsivsi commented Jul 13, 2014

FYI, This has been merged into the master branch. I intend to publish a new version to Atmosphere later this evening.

@mitar
Copy link
Collaborator Author

mitar commented Jul 14, 2014

Thanks!

@vsivsi
Copy link
Owner

vsivsi commented Jul 18, 2014

Feature released in v0.0.14.

@vsivsi vsivsi closed this as completed Jul 18, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants