coen-hyde / Shanty-Mongo

Shanty Mongo is a mongodb library for the Zend Framework. Its intention is to make working with mongodb documents as natural and as simple as possible. In particular allowing embedded documents to also have custom document classes.
Other
200 stars 52 forks source link

Ignore properties #89

Closed tholder closed 12 years ago

tholder commented 12 years ago

@coen-hyde could you have a look at this? I've had a few instanced where I've need to override export to add custom data but don't want it persisted back to mongo.

This adds a simple 'Ignore' requirement to prevent a field being saved to Mongo.

tholder commented 12 years ago

Sorry, should have said, I branched this off my previous replace-doc branch, so it's only really the last commit for this function.

coen-hyde commented 12 years ago

I like all these tests!

tholder commented 12 years ago

Cheers Coen.

tholder commented 12 years ago

There is an issue with this, it doesn't work when updating a document. I shall investigate and add test.

tholder commented 12 years ago

@coen-hyde

Weird, I've put a more extensive test on master including update and adding with sub document. Seems to work fine. Not sure why my own codebase is borking with this.