-
Notifications
You must be signed in to change notification settings - Fork 82
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
Stomping properties. #5
Comments
If you do this, then how do you later add properties to a document? |
sorry, to be clear, if a class definition has this layout: public class PlainPOCO{ but the database has a property called "CreationDate", updating via norm should not cause that property to be lost.. public DateTime CreationDate{get;set;} then it should be handled properly by NoRM, make sense? |
That makes sense - I was reading it as the reverse of that. =) |
This feature would be incredibly useful. All you'd need to do is issue an .update(matchDoc, {$set {updateDoc} }) Any elements not in the $set are untouched. Any elements in the $set are replaced/added. |
a simpler approach is to just reflect over what's defined on the class definition and build the spec document based on that. If you could have set it in c# but nulled it, the it should be set to null in the db. $set/$unset should also be supported, but for different reasons, I think. |
Updates should only alter properties that are defined on the document, and should leave other properties untouched when updating.
The text was updated successfully, but these errors were encountered: