Protecting attributes from being updated

Feb 15, 2012 at 2:41 PM

I'm assuming this is already documented, and I'm just missing it, so anyways...

Is there a way to "protect" attributes from being updated? My hope is that if I create a new object and Simol.Put it, it will write every attribute. The next time around, if I'm putting an object with Simol, and it already exists on simpleDB, I'd like to make sure certain attributes from the original object creation remain untouched.

I could do this manually, by making sure the "new" object has the "old" values, but I'm just curious if there's a way to do this.


Feb 15, 2012 at 3:01 PM

No this isn't done automatically because there's no way for Simol to know what attributes already exist in SimpleDB without first loading the attributes for whatever item you're updating. If you want to guarantee that certain attributes are not changed you'll need to either load the object from SimpleDb first or use the PutAttributes methods to perform a partial object update. See the docs here.