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

Deprecated: MongoCollection::save() #1783

Closed
tanagorns opened this issue Jan 10, 2014 · 6 comments
Closed

Deprecated: MongoCollection::save() #1783

tanagorns opened this issue Jan 10, 2014 · 6 comments

Comments

@tanagorns
Copy link

I used multiple findFirst and save() at the same time.

show error

 Deprecated: MongoCollection::save(): The 'safe' option is deprecated, please use 'w' instead
@moderndeveloperllc
Copy link

This has to do with the version of the mongo client being used. They will have to put conditionals in to check the client version.

@tanagorns
Copy link
Author

add_assoc_bool_ex(options, SS("safe"), 1);

this line should be change to "w"

I had to see the other framework (eg. kohana)
tchemineau/kohana-mongodb@b3366f7

@ghost
Copy link

ghost commented Jan 12, 2014

I believe we do use 'w' instead of 'safe', at least in 1.3.0: https://github.com/phalcon/cphalcon/blob/1.3.0/ext/mvc/collection.c#L1491

@ghost ghost mentioned this issue Jan 13, 2014
@ghost
Copy link

ghost commented Jan 13, 2014

Submitted PR for 1.2.5: #1797

@tanagorns
Copy link
Author

thank for resolve my issue

I've finding the code at all line in collection.c, I found the same issue
https://github.com/phalcon/cphalcon/blob/1.3.0/ext/mvc/collection.c#L2016

referrence
http://www.php.net/manual/en/mongocollection.remove.php

@ghost ghost mentioned this issue Jan 13, 2014
@ghost
Copy link

ghost commented Jan 13, 2014

Fix submitted

phalcon pushed a commit that referenced this issue Jan 13, 2014
phalcon pushed a commit that referenced this issue Jan 13, 2014
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

No branches or pull requests

3 participants