diff --git a/cassandra/cqlengine/usertype.py b/cassandra/cqlengine/usertype.py
index 1e30fc8..f55b512 100644
— a/cassandra/cqlengine/usertype.py
+++ b/cassandra/cqlengine/usertype.py
@@ -56,7 +56,7 @@ class BaseUserType(object):
return not self._eq_(other)
def _str_(self):
return "{}".format(', '.join("'{}': {}".format(k, getattr(self, k)) for k, v in six.iteritems(self._values)))
+ return "{}".format(', '.join("{}: '{}'".format(k, getattr(self, k)) for k, v in six.iteritems(self._values)))
def has_changed_fields(self):
return any(v.changed for v in self._values.values())
Possible fix is in ^. It should probably be different though based on the underlying type?
Unclear if there is an error, or if this is just a suggestion to make the instance str output look like CQL Trying to get further input.
User shared the model that causes this error:
The problem is with cqlengine collections. They do not properly encode nested types. Will need to improve how encoding is done at that level.
+1 on the changes
Pull request for test submitted here.