Reformat code. Add since tags. Extend keyspace association to PreparedStatements so that simple CQL statements get associated with the keyspace upon prepare. Remove check if a statement is a bound statement as prepared statements should not fail with applyStatementSettings(…).
Fix keyspace configuration in …Options objects as Insert/Update/Delete options should consider the keyspace when using the builder. Extend tests.
Simplify Cassandra version check. Ensure the discovery session gets closed after its use.
Original pull request: #177.
Use JUnit Jupiter annotations. Replace RunWith with JUnit Extensions. Replace CassandraRule with CassandraExtension to spin up embedded cassandra and to create keyspaces per test container.
We now support context extensions that contribute contextual details using a reactive programming model for evaluation of SpEL expressions in @Query methods.
We now support reactive auditing by providing the EnableReactiveCassandraAuditing annotation. Previously, EnableCassandraAuditing no longer registers ReactiveAuditingEntityCallback for date-only auditing, the callback is now only registered when using EnableReactiveCassandraAuditing.
Switch AddToBuilder.prepend(Object) and .append(Object) implementations to use Collections.singletonList(…) to align with prependAll(Object...) and appendAll(Object...) implementations.
Replace toString assertions with more specific hasToString(…) assertion. Improve naming and collection creation.
Original pull request: #174.
DefaultColumnTypeResolver now resolves correctly set-typed values to a set<…> column type. This change fixes a bug related to adding new elements to a Set via UpdateMapper.
Original pull request: #174.
Add value shortcut to Embedded.Nullable and Embedded.Empty for improved annotation usage. Move isEntity check into PersistentProperty.isEmbedded as both checks are issued always together.
Tweak documentation.
Original pull request: #173.
Embedded entities are used to design value objects in your Java domain model whose properties are flattened out into the table.
In the following example you see, that User.name is annotated with Embedded.
The consequence of this is that all properties of `UserName` are folded into the `user` table which consists of 3 columns (user_id, firstname, lastname).
Embedded entities may only contain simple property types. It is not possible to nest an embedded entity into another embedded one.
However, if the firstname and lastname column values are actually null within the result set, the entire property name will be set to null according to the onEmpty of Embedded, which nulls objects when all nested properties are null.
Opposite to this behaviour USE_EMPTY tries to create a new instance using either a default constructor or one that accepts nullable parameter values from the result set.
public class User {
@PrimaryKey("user_id")
private String userId;
@Embedded(onEmpty = USE_NULL)
UserName name;
}
public class UserName {
private String firstname;
private String lastname;
}
Original pull request: #173.
Remove FrozenIndicator from public API. Refactor to recursive type to reflect property type declaration nature. Rename to FrozenIndicator. Update documentation.
Original pull request: #172.