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

Change Request: Document->createFromArray($array) should set "Changed" flag to true instead of false #8

Closed
frankmayer opened this issue Oct 3, 2012 · 2 comments
Labels

Comments

@frankmayer
Copy link
Contributor

I bumped into this while writing a wrapper function for an ODM-Bundle I am writing for Laravel (PHP.) .

It will soon be on Github, once I declare it stable enough for other users to work with it. (Maybe to day or tomorrow).

The save() function from the ODM is checking if the document has changed before actually saving it.

The problem arises when a document is created from an array. In the method it sets Changed to false.

I believe this is a wrong behavior, since it is changed from nothing to a document with data which hasn't been saved to the collection.

The change is a simple replace of false to true in Document.php Line76.

@jsteemann
Copy link
Contributor

done

@frankmayer
Copy link
Contributor Author

Great!! Thanks!

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

No branches or pull requests

2 participants