I'm using the Spring Data Cassandra in my project, i need to save a date value in the Cassandra table, the column type is Date in DB, i can save the value in it, but i can't set it back to null. When i was calling the
CrudRepository ->save(obj)
, the data in the field was not removed. I tried to set the date field in the bean to null, then call the save method, it not work.
I'm wondering how can i save the date value back to null?
Anyone please help.
Thanks.
The cassandra can support insert many times for the same record. So I just call the same method for both create and update. If i use the cassandra api, to create a BoundStatement, use the SQL "insert into xxxx(a,b) value(?,?);" i can insert the null value to the table successfully. But if i call the repository's save() method, the date value will be the same as before.