tdb_cassandra: Let pycassa serialize timestamp when validated.

Pycassa will do its own marshalling when columns have validators
specified in the C* metadata.  We need to disable our own marshalling
when we know Pycassa will take care of it. This is already taken care of
in the general case, but timestamps are handled somewhat uniquely.
This commit is contained in:
Neil Williams
2012-07-13 23:04:49 -07:00
parent 1db68ce6b1
commit 2f37f2604d

View File

@@ -580,7 +580,8 @@ class ThingBase(object):
s_now = self._serialize_date(datetime.now(tz))
now = self._deserialize_date(s_now)
updates[self._timestamp_prop] = s_now
timestamp_is_typed = self._get_column_validator(self._timestamp_prop) == "DateType"
updates[self._timestamp_prop] = now if timestamp_is_typed else s_now
self._dirties[self._timestamp_prop] = now
if not updates and not self._deletes: