Replace Flux/Mono.onErrorResumeWith(…) with Flux/Mono.onErrorMap(…) and turn translateException into a method returning a mapping function instead of a Mono emitting the mapped exception.
We now test compatibility with Apache Cassandra's duration type (introduced with Apache Cassandra 3.10). Duration requires a driver version >= 3.2.0 so we drop build profiles against earlier driver versions and use Apache Cassandra 3.10 for integration tests.
Enforce frozen user types in collection types when creating tables and frozen user types when referencing a user type from another type. Previously, the driver returned frozen user-types and no interaction from our side was required. Move user-type specifics to UserTypeUtil.
Introduce compatibility code within the tests to build against different driver versions.
We now no longer insert null values via CassandraOperations.insert(…). Inserting null values creates tombstones in Cassandra which are likely unwanted and impact performance. Omitting null values simply does not create values in Cassandra. Setting properties to null with UPDATE remains unchanged and updating an object containing null values will propagate all null values to Cassandra as part of the UPDATE clause.
SimpleCassandraRepository.save(…) needs to consider whether the entity is new or whether it consists only of primary key properties to propagate the optimization. New entities and entities consisting only of primary key columns are saved via INSERT. All other entities are saved via UPDATE.
We now support configuration of a CqlTemplate reference when creating CassandraTemplate via XML namespace configuration. Configuring a reference allows reusing an existing CqlOperations instance via CassandraTemplateFactoryBean. Additionally, CassandraTemplateFactoryBean now supports setting a SessionFactory.
<cql:template id="my-cql-template" />
<cassandra:template cql-template-ref="my-cql-template"/>
We now use the correct bean name `cassandraTemplate` when configuring a CassandraTemplate instance via XML namespace support. Previously, the bean name defaulted to `cqlTemplate`. CassandraTemplate and CqlTemplate no longer share the same type hierarchy but are separated since 2.0.x.
Original pull request: #96.
Related ticket: DATACASS-292.
We now consider the element type and property component type when reading Cassandra collections (sets and lists). Inspecting every collection element regarding its source and target type allows a fine grained conversion of elements to the target type.
Previously, we just applied conversion if custom converters were registered. This change also considers the declared collection type of the property.
TypedIdCassandraRepository redeclares save() and findAll(…) methods returning List. Propagating the more specialized return type allows easier use of the collection result.
We now issue individual statements to save and delete each element of a collection of objects when used with CassandraRepository.save(Iterable) and CassandraRepository.delete(Iterable). Previously, the collection argument was considered an entity.
Save/delete do not use batch operations to prevent accidental wrong use of Cassandra batches.
We now issue individual statements to save and delete each element of a collection of objects when used with CassandraRepository.save(Iterable) and CassandraRepository.delete(Iterable). Previously, the collection argument was considered an entity.
Save/delete do not use batch operations to prevent accidental wrong use of Cassandra batches.
Extend year range in copyright headers. Reformat code. Add JavaDoc. Add ticket references to test methods. Remove unused code. Add guard to test to not call UserTypeResolver during type creation. Rename UserDataTypeProvider to DataTypeProvider and the individual constants to reflect what they provide.
Original pull request: #100.
Works for simple user defined types and those used in Lists or Sets.
It does not work yet for maps and other collection-like types.
Related tickets: DATACASS-409.
Original pull request: #100.
Add id attribute to XML schema for Spring Data Cassandra Namespace support. Rename CassandraMappingBeanFactoryPostProcessorTests to CassandraMappingBeanFactoryPostProcessorUnitTests to execute the test in the build.
Original pull request: #94.