Commit Graph

341 Commits

Author SHA1 Message Date
Christoph Strobl
d1291f3b6b Release version 4.1.5 (2020.0.5).
See #1085
2021-02-18 10:59:16 +01:00
Christoph Strobl
bd4bdcfacc Prepare 4.1.5 (2020.0.5).
See #1085
2021-02-18 10:58:50 +01:00
Michael Reiche
029f30aed9 Revert "DATACOUCH-550 - Refactored the usage of CouchbasePersistentEntityIndexCreator. (#298)" (#1088)
This reverts commit 883c931cf4.

Co-authored-by: mikereiche <michael.reiche@couchbase.com>
2021-02-17 09:53:29 -08:00
Christoph Strobl
0fd3b492bf After release cleanups.
See #1043
2021-02-17 13:41:55 +01:00
Christoph Strobl
2d9f0b9474 Prepare next development iteration.
See #1043
2021-02-17 13:41:54 +01:00
Christoph Strobl
07d9fe21ae Release version 4.1.4 (2020.0.4).
See #1043
2021-02-17 12:00:24 +01:00
Christoph Strobl
a85952c57d Prepare 4.1.4 (2020.0.4).
See #1043
2021-02-17 11:59:37 +01:00
Aaron Whiteside
883c931cf4 DATACOUCH-550 - Refactored the usage of CouchbasePersistentEntityIndexCreator. (#298)
pom.xml
- updated CouchbaseMock dependency to the official release on maven central, which now includes the required commit.

CouchbaseTemplate.java
- remove creation of CouchbasePersistentEntityIndexCreator
- there can only be a single CouchbaseMappingContext and CouchbasePersistentEntityIndexCreator, not sure why there was code dealing with multiples of each, and there was no corresponding tests for these assumptions.
- no longer does the job of a @Configuation class by gluing beans together with their dependencies.

CouchbaseMappingContext.java
- removed references to auto index creation, that functionality should be a completely separate concern.

CouchbasePersistentEntityIndexCreator.java
- as well as implementing ApplicationListener, it now also implements InitializingBean
- when afterPropertiesSet() is called it uses CouchbaseMappingContext#getPersistentEntities to retrieve the list of entity candidates for index creation. This will handle the creation of indices for entities known at @Configuration time.
- for entities not in the initialEntitySet of the MappingContext, the ApplicationListener will handle those entities at runtime.
- this is needed because the AbstractMappingContext will emit events when it is initialized via InitializingBean, and any beans that depend on MappingContext and also implement ApplicationListener expecting to receive those events won't.
 - in our case because Spring will have fully initialised the CouchbaseMappingContext instance before passing it to the CouchbasePersistentEntityIndexCreator instance we won't get those events.
- added a boolean flag to indicate if automatic index creation is to be enabled or now, passed in by the factory method that creates this bean.
- minor logging cleanup, use property placeholders where appropriate

AbstractCouchbaseConfiguration.java
- added a new factory method for the CouchbasePersistentEntityIndexCreator bean.
- CouchbaseMappingContext no longer has anything to do with index creation, other than supplying a candidate list of entities that may need indices.

Prompted by:
https://github.com/spring-projects/spring-boot/issues/24525
and the discussion on https://github.com/spring-projects/spring-data-couchbase/pull/295

Co-authored-by: Aaron Whiteside <awhiteside@yapstone.com>
2021-02-16 15:06:11 -08:00
Michael Reiche
37113c67ad DATACOUCH-588 - Part 2 of 2 refactoring for paging and projection. (#1080)
* DATACOUCH-588 - Part 2 of framework changes. Add support for projection and distinct. (#1040)

Support for projection is only for properties of the top-level entity. For instance, in UserSubmission, only the properties below can be specified in the projection. Projection support does not provide means of specifying something like address.street - you can only project (or not project) the whole address property. However, the address type in your resultType could have a subset of the properties in Address.

If the corresponding submissions in the resultType contained only the userId property

public class UserSubmission extends ComparableEntity {
	private String id;
	private String username;
	private List<String> roles;
	private Address address;
	private List<Submission> submissions;

Support for Distinct - I have appropriated the MongoDB model for Distinct.  It defines a separate DistinctOperationSupport class (within ExecutableFindByQuerySupport) which supports the distinct( distinctFields ) api and execution. The DistinctOperationSupport class has only a distinctFields member, and a 'delegate' member, which is an ExecutableFindByQuerySupport object. TBH, I don't see the advantage over simply adding a distinctFields member to ExecutableFindByQuerySupport

Amend #1 - changes as discussed in Pull Request
         - clean up test entity types

Amend #2
- Eliminate DistinctOperationSupport class. In MongoDB, only distinct on a single field is supported, so the returnType from distinct was very different from the returnType of other query operations (all(), one() etc. (but so is count(), and it doesn't need it's own class)). In Couchbase, distinct on any fields in the entity is allowed - so the returned type could be the domainType or resultType. And as(resultType) still allows any resultType to be specified. This makes it unnecessary to have combinations of interfaces such as DistinctWithProjection and DistinctWithQuery.

- Clean up the interfaces in ExecutableFindByQuery. There are two types of interfaces (a) the TerminatingFindByQuery which has the one(), oneValue() first(), firstValue(), all(), count(), exists() and stream(); and (b) the option interfaces (FindByQueryWithConsistency etc), which are essentially with-er interfaces. The changes are:
1) make all the with-er interfaces base interfaces instead of chaining them together. (I don't know why there isn't simply one interface with all the with-er methods).
2) make the ExecutableFindByQuery interface extend the Terminating interface and all the with-er interfaces.

Amend #3
- Add execution support for collections

Amend #4
- Add tests for collections. This includes a new CollectionAwareIntegrationTests class which extends a new JavaIntegratationTests class which extends the existing ClusterAwareIntegrationTests.
- Fixed up several issues collections issues that were uncovered by the tests.
- Did further cleanup of OperationSupport interfaces.

Amend #5
- Revert changes to interfaces in *Operation
- Sorted interfaces in same order for consistency (because of the chaining of interfaces, fluent methods must be called in order).

Co-authored-by: mikereiche <michael.reiche@couchbase.com>

* DATACOUCH-588 - after cherry-pick, remove reference to 4.2 method deleteAllById().

Original pull request #1040
2021-02-16 15:01:21 -08:00
Michael Reiche
570792d353 DATACOUCH-588 - Refactoring part 1 of n. (#278)
* DATACOUCH-588 - Implement pageable and realign repo query

This implements pageable for non-reactive queries and
realigns reactive queries with other spring-data projects
to facilitate the implementaion of pageable (done) and other
types of queries such as projection and distinct (not yet
done)

* DATACOUCH-588 - Implement pageable and realign repo query

This implements pageable for non-reactive queries and
realigns reactive queries with other spring-data projects
to facilitate the implementaion of pageable (done) and other
types of queries such as projection and distinct (not yet
done)

* DATACOUCH-588 - Refactoring part 1 of n.

Co-authored-by: mikereiche <michael.reiche@couchbase.com>
2021-02-16 14:21:40 -08:00
Christoph Strobl
d2be5d17b4 After release cleanups.
See #979
2021-01-13 15:01:50 +01:00
Christoph Strobl
4da3b9b664 Prepare next development iteration.
See #979
2021-01-13 15:01:49 +01:00
Christoph Strobl
5a55a79b11 Release version 4.1.3 (2020.0.3).
See #979
2021-01-13 14:56:53 +01:00
Christoph Strobl
d2a6ced9ce Prepare 4.1.3 (2020.0.3).
See #979
2021-01-13 14:56:53 +01:00
Mark Paluch
06500e1eaa Revert commits for DATACOUCH-650 that shouldn't had been backported to 4.1.x.
See #1042
2021-01-13 14:52:43 +01:00
Greg L. Turnquist
899156269d DATACOUCH-664 - Use Docker hub credentials for all CI jobs. 2020-12-17 11:18:08 -06:00
Michael Reiche
aa52337d13 DATACOUCH-666 - Set Ccouchbase java sdk back to 3.0.10 after inadvertenly changing. (#290) 2020-12-09 14:19:38 -08:00
Mark Paluch
57c21a7e62 DATACOUCH-650 - Polishing.
Reorder methods. Remove superfluous final keyword. Reformat pom. Fix dependency to Spring Data Commons.

Original pull request: #279.
2020-12-09 14:03:50 -08:00
Jens Schauder
dfd2dd66b3 DATACOUCH-650 - Implements CrudRepository and ReactiveCrudRepository.deleteById(Iterable<ID> ids).
Original pull request: #279.
2020-12-09 14:01:25 -08:00
Mark Paluch
d925df2bc3 DATACOUCH-648 - After release cleanups. 2020-12-09 16:46:55 +01:00
Mark Paluch
b2a0e69417 DATACOUCH-648 - Prepare next development iteration. 2020-12-09 16:46:49 +01:00
Mark Paluch
57154e2bcb DATACOUCH-648 - Release version 4.1.2 (2020.0.2). 2020-12-09 16:01:27 +01:00
Mark Paluch
d313bac1c1 DATACOUCH-648 - Prepare 4.1.2 (2020.0.2). 2020-12-09 16:00:56 +01:00
Michael Reiche
3138b4a9c9 DATACOUCH-662 Upgrade Couchbase Java SDK to 3.0.10 for 4.1.x. (#283)
Co-authored-by: mikereiche <michael.reiche@couchbase.com>
2020-12-08 09:30:43 -08:00
Mark Paluch
b5d96b8e71 DATACOUCH-639 - After release cleanups. 2020-11-11 12:14:54 +01:00
Mark Paluch
6ed5f52565 DATACOUCH-639 - Prepare next development iteration. 2020-11-11 12:14:51 +01:00
Mark Paluch
18ea50b7fa DATACOUCH-639 - Release version 4.1.1 (2020.0.1). 2020-11-11 11:59:00 +01:00
Mark Paluch
9d671a8151 DATACOUCH-639 - Prepare 4.1.1 (2020.0.1). 2020-11-11 11:58:36 +01:00
Mark Paluch
6c7e882d2d DATACOUCH-635 - After release cleanups. 2020-10-28 16:10:55 +01:00
Mark Paluch
4b2a954d30 DATACOUCH-635 - Prepare next development iteration. 2020-10-28 16:10:52 +01:00
Mark Paluch
3c69b45854 DATACOUCH-635 - Release version 4.1 GA (2020.0.0). 2020-10-28 15:46:57 +01:00
Mark Paluch
6a51b0c573 DATACOUCH-635 - Prepare 4.1 GA (2020.0.0). 2020-10-28 15:46:33 +01:00
Christoph Strobl
97eda5441b DATACOUCH-612 - After release cleanups. 2020-10-14 14:48:48 +02:00
Christoph Strobl
242ce87628 DATACOUCH-612 - Prepare next development iteration. 2020-10-14 14:48:46 +02:00
Christoph Strobl
46cf6f1d78 DATACOUCH-612 - Release version 4.1 RC2 (2020.0.0). 2020-10-14 14:28:56 +02:00
Christoph Strobl
192fb27b60 DATACOUCH-612 - Prepare 4.1 RC2 (2020.0.0). 2020-10-14 14:27:38 +02:00
Michael Reiche
3cccf1f2c3 DATACOUCH-634 - Upgrade Couchbase Java SDK to 3.0.9. (#271)
Co-authored-by: mikereiche <michael.reiche@couchbase.com>
2020-10-13 14:58:22 -07:00
Mark Paluch
07c28fe7fe DATACOUCH-601 - After release cleanups. 2020-09-16 14:05:29 +02:00
Mark Paluch
a32f2df5d0 DATACOUCH-601 - Prepare next development iteration. 2020-09-16 14:05:26 +02:00
Mark Paluch
bd4ca4cb6f DATACOUCH-601 - Release version 4.1 RC1 (2020.0.0). 2020-09-16 13:57:43 +02:00
Mark Paluch
b69fcb8afe DATACOUCH-601 - Prepare 4.1 RC1 (2020.0.0). 2020-09-16 13:57:09 +02:00
Mark Paluch
0b79dabfc7 DATACOUCH-607 - Upgrade to Couchbase SDK 3.0.8. 2020-09-14 15:15:32 +02:00
Mark Paluch
ddeca8868b DATACOUCH-578 - After release cleanups. 2020-08-12 12:00:24 +02:00
Mark Paluch
ff193996a7 DATACOUCH-578 - Prepare next development iteration. 2020-08-12 12:00:21 +02:00
Mark Paluch
8799ab0aed DATACOUCH-578 - Release version 4.1 M2 (2020.0.0). 2020-08-12 11:52:07 +02:00
Mark Paluch
a047126c36 DATACOUCH-578 - Prepare 4.1 M2 (2020.0.0). 2020-08-12 11:51:41 +02:00
Mark Paluch
88492c743b DATACOUCH-599 - Upgrade to Couchbase SDK 3.0.7. 2020-08-10 11:15:48 +02:00
Mark Paluch
8107f984cc DATACOUCH-586 - Upgrade to Couchbase Driver 3.0.6. 2020-07-22 08:55:23 +02:00
Mark Paluch
3c6f245802 DATACOUCH-548 - After release cleanups. 2020-06-25 11:58:24 +02:00
Mark Paluch
8d8dd6a03d DATACOUCH-548 - Prepare next development iteration. 2020-06-25 11:58:21 +02:00