masumsoft / express-cassandra

Cassandra ORM/ODM/OGM for NodeJS with support for Apache Cassandra, ScyllaDB, Datastax Enterprise, Elassandra & JanusGraph.
http://express-cassandra.readthedocs.io
GNU Lesser General Public License v3.0
228 stars 67 forks source link

Default attribute doesn't work in schema #226

Closed zammitjames closed 2 years ago

zammitjames commented 3 years ago

I've been trying to generate an auto id in a schema model by using the built in default function as below.

id: { type: 'uuid', default: {'$db_function': 'uuid()'} },

For some reason it's like it completely ignores the default attribute. It doesn't seem to be executed even if i return plain text or try generating a timestamp.

Any ideas?

masumsoft commented 3 years ago

Could you share how you store data for this attribute?

masumsoft commented 2 years ago

Closing due to inactivity