Commit Graph

1174 Commits

Author SHA1 Message Date
Mark Paluch
ca1e57d0c3 DATACASS-676 - Fix custom conversion registration example. 2019-07-26 11:42:42 +02:00
Mark Paluch
c8d38a62cd DATACASS-677 - Adapt to API changes in Commons. 2019-07-26 09:14:45 +02:00
Greg Turnquist
53e9db3ad0 DATACASS-659 - Polishing. 2019-07-19 12:02:10 -05:00
Greg Turnquist
ac467611a4 DATACASS-659 - Publish documentation for main branch. 2019-07-19 12:02:09 -05:00
Mark Paluch
946ef41da2 DATACASS-675 - Add constructors CassandraAdminTemplate accepting Session and CqlOperations.
CassandraAdminTemplate can now be constructed by passing either just a Session or CqlOperations and CassandraConverter to consistently expose the same constructors as its superclass CassandraTemplate.
2019-07-15 10:57:59 +02:00
Mark Paluch
1fcbbc8fb2 DATACASS-318 - Allow configuration of CodecRegistry in CassandraMappingContext.
We now allow configuration of CodecRegistry in CassandraMappingContext to reuse the configured instance instead of using the default CodecRegistry instance.
2019-07-11 16:03:45 +02:00
Mark Paluch
24fcea3f92 DATACASS-318 - Allow configuration of CodecRegistry in CassandraClusterFactoryBean. 2019-07-11 15:33:35 +02:00
Mark Paluch
5bacc63b5a DATACASS-674 - Polishing.
Replace AtTest(expected = …) and ExpectedException with the corresponding AssertJ assertThatExceptionOfType(…) and assertThatIllegalArgumentException().isThrownBy(…).
2019-07-10 13:57:46 +02:00
Mark Paluch
2b2173ccb5 DATACASS-674 - Migrate tests to AssertJ. 2019-07-10 13:35:37 +02:00
Mark Paluch
dd05e748fa DATACASS-673 - Fix typo. 2019-07-10 09:52:42 +02:00
Mark Paluch
bd3bb4a6a7 DATACASS-659 - Cleanup release profile.
Reuse inherited configuration from parent pom.
2019-07-09 10:23:36 +02:00
Mark Paluch
1ba4dc721c DATACASS-673 - Revise readme for a consistent structure. 2019-07-09 10:23:14 +02:00
Greg Turnquist
e058013785 DATACASS-659 - Use agent label. 2019-07-03 14:08:11 -05:00
Greg Turnquist
3542b8b1f8 DATACASS-659 - Use parent 'artifactory' profile. 2019-07-03 10:51:30 -05:00
Mark Paluch
b3a63f6a67 DATACASS-4 - Polishing.
Fix anchor for entity callbacks.
2019-07-01 15:17:59 +02:00
Mark Paluch
993a82f088 DATACASS-672 - Polishing.
Reflect dropped Serializable requirement on primary key classes in documentation.
2019-07-01 12:30:46 +02:00
Mark Paluch
792e201a34 DATACASS-672 - Fix composite key property population when creating the enclosing entity through constructor.
We now properly populate composite key properties when the key object is set through the entity constructor. Previously, key properties where left uninitialized (properties were not populated) when the key object was created in the code path to be injected as entity constructor argument. Key properties were only set in the case where the key also was be constructed with constructor arguments.
2019-07-01 12:30:46 +02:00
Greg Turnquist
a6f3986214 DATACASS-659 - Polishing. 2019-06-28 16:18:54 -05:00
Greg Turnquist
3d0d93ff75 DATACASS-659 - Only main branch runs based on upstream cause. 2019-06-28 16:14:20 -05:00
Greg Turnquist
744ee4802a DATACASS-659 - Polishing. 2019-06-24 13:25:36 -05:00
Greg Turnquist
4575056759 DATACASS-659 - Configure user.name and user.home for CI jobs. 2019-06-24 10:19:25 -05:00
Mark Paluch
f8d87e24bd DATACASS-611 - Add query derivation for delete queries.
We now support query derivation for delete queries using delete…By in method declarations.

interface PersonRepository extends Repository<Person, String> {

  void deleteWithoutResultByLastname(String lastname);

  boolean deleteByLastname(String lastname);
}
2019-06-18 17:20:41 +02:00
Mark Paluch
4f93fb830b DATACASS-454 - Extend @Query to declare idempotent CQL queries.
String-based queries can now be marked as idempotent. Also, SELECT queries defined via @Query are also considered idempotent to make these retryable.

interface PersonRepository extends Repository<Person, String> {

    @Query("SELECT * FROM person WHERE lastname = ?0;") // idempotent by default
    Person findByLastname(String lastname);

    @Query(value = "UPDATE person SET lastname = ?0", idempotent = Query.Idempotency.IDEMPOTENT)
    void updatePerson(String name);

}
2019-06-18 15:03:24 +02:00
Mark Paluch
8064a6d1dd DATACASS-642 - Consider quoted identifiers in EntityQueryUtils and CqlIdentifier.
EntityQueryUtils now considers quoted identifiers when extracting table names.
2019-06-18 14:15:09 +02:00
Christoph Strobl
f4b243fcfe DATACASS-649 - After release cleanups. 2019-06-14 15:12:52 +02:00
Christoph Strobl
1f2acf02cb DATACASS-649 - Prepare next development iteration. 2019-06-14 15:12:51 +02:00
Christoph Strobl
20ed040cbb DATACASS-649 - Release version 2.2 RC1 (Moore). 2019-06-14 14:44:25 +02:00
Christoph Strobl
eca9a2e5c4 DATACASS-649 - Prepare 2.2 RC1 (Moore). 2019-06-14 14:43:17 +02:00
Christoph Strobl
4d787f5dd2 DATACASS-649 - Updated changelog. 2019-06-14 14:43:09 +02:00
Christoph Strobl
7d97ba7d9b DATACASS-657 - Updated changelog. 2019-06-14 13:27:14 +02:00
Mark Paluch
f6844ef94a DATACASS-536 - Deprecate TableOption.COMPACT_STORAGE.
Cassandra 4.x has deprecated compact storage so we're reflecting these changes in our table creation support.
2019-06-07 16:18:15 +02:00
Mark Paluch
8f6d070707 DATACASS-618 - Polishing.
Expose maybeEmitEvent(…) so it can be overridden in subclasses.
2019-06-07 16:07:36 +02:00
Mark Paluch
86c47e80f8 DATACASS-4 - Add support for auditing.
We now support auditing using Spring's IsNewAwareAuditingHandler. Entities that are saved are processed before persisting these through auditing EntityCallbacks.

@Table
class Entity {

  @Id Long id;

  @CreatedDate
  LocalDateTime created;

  @LastModifiedDate
  LocalDateTime modified;

   // …
}

@EnableCassandraAuditing
@Configuration
class MyConfiguration extends AbstractReactiveCassandraConfiguration {

 // …
}
2019-06-07 16:00:54 +02:00
Mark Paluch
9de890ce09 DATACASS-618 - Integrate EntityCallbacks.
We now support EntityCallbacks via DefaultEntityCallbacks and DefaultReactiveEntityCallbacks.
2019-06-07 16:00:54 +02:00
Mark Paluch
e972181288 DATACASS-663 - Replace StepVerifier.create(…) style with .as(StepVerifier::create) style. 2019-06-05 16:28:36 +02:00
Mark Paluch
7415e294ee DATACASS-651 - Fix DataType resolution for TupleValue in Maps.
We now correctly resolve Map key and value types if they are raw/mapped tuple values. Previously, we inspected only the first type without considering whether the property is a map/collection.

Resolution of types is now recursive and considers whether the property is a map or a collection.

We also consistently use MappingException to indicate type resolution failures.
2019-06-05 16:18:38 +02:00
Mark Paluch
9a62942861 DATACASS-661 - Fix findAllById(…) repository queries using MapId.
We now detect the Id property repositories using MapId with single keys. Cassandra supports only single keys with IN queries so we reject composite keys using imperative repositories with MapId in findAllById(findAllById).

The reactive findAllById(…) repository method fetched rows one-by-one. We now optimize the query using IN queries with a single roundtrip if possible. Composite MapId keys are fetched one-by-one as previously done as fallback.
2019-06-05 13:03:03 +02:00
Chaouki Dhib
664ba968f0 DATACASS-660 - Fix typo regarding the usage of Query objects.
Original pull request: #161.
2019-06-03 13:57:43 +02:00
Mark Paluch
420c9f1229 DATACASS-662 - Create security policy readme. 2019-05-31 16:09:19 +02:00
Chaouki Dhib
249aa5e304 DATACASS-660 - Fix typo regarding the usage of Query objects.
Original pull request: #160.
2019-05-29 14:21:31 +02:00
Greg Turnquist
3d3330b239 DATACASS-659 - Polishing. 2019-05-28 14:19:48 -05:00
Greg Turnquist
287e93e996 DATACASS-659 - Introducing Jenkins. 2019-05-28 13:19:36 -05:00
Mark Paluch
64e722b7d1 DATACASS-654 - Updated changelog. 2019-05-13 18:19:06 +02:00
Mark Paluch
272db101fa DATACASS-653 - Updated changelog. 2019-05-13 14:59:26 +02:00
Mark Paluch
b065a30f2d DATACASS-650 - After release cleanups. 2019-05-13 12:17:53 +02:00
Mark Paluch
c0b709880a DATACASS-650 - Prepare next development iteration. 2019-05-13 12:17:52 +02:00
Mark Paluch
bd6460d1e9 DATACASS-650 - Release version 2.2 M4 (Moore). 2019-05-13 11:59:50 +02:00
Mark Paluch
f4e5860907 DATACASS-650 - Prepare 2.2 M4 (Moore). 2019-05-13 11:59:04 +02:00
Mark Paluch
ff3c95a9cc DATACASS-650 - Updated changelog. 2019-05-13 11:58:55 +02:00
Oliver Drotbohm
af60d1518d DATACASS-644 - Updated changelog. 2019-05-10 14:18:12 +02:00