Commit Graph

1042 Commits

Author SHA1 Message Date
Michael Reiche
797a454108 Fix 1441 in 4_4_x - scope and collection not considered in repo delete.
This is a more localized change than the one in main.

Closes #1464.
2022-06-17 11:05:33 -07:00
Michael Reiche
72886bb256 Back-out the breaking part of 1441 from 4_4_x.
n1ql.bucket will continue to be (collection != null ? collection : bucket)
so that queries that referenced n1ql.bucket after being used on collections
will still work.

Closes #1462.
2022-06-16 15:24:58 -07:00
Michael Reiche
f052aa4826 Add n1ql.scope and n1ql.collection spel expressions for @Query.
This adds n1ql.scope and n1ql.collection spel expressions for
@Query so that n1ql.bucket doesn't need to be overloaded with
the collection name. This will make the bucket name available
in n1q.bucket.

This is a breaking change as queries that used n1ql.bucket to
get the collection name (especially in the case of pre-scope-
and-collection @Queries that (a) referenced n1ql.bucket instead
of referencing other spel expressions that include the
bucket/collection name; and (b)  still worked after the
repository was moved from a bucket onto a collection by
virtue of n1ql.bucket having the value of the collection in
such instances.

Closes #1445.
2022-06-16 10:03:14 -07:00
Michael Reiche
b76ee48240 Add BigDecimal converter.
Add BigDecimal converter, add converter tests for BigDecimal and BigInteger.
Since BigDecimail is not support, it cannot be used in the CustomerConverter tests.
So instead use ChoiceFormat for CustomConverter tests.

Closes #1439.
2022-06-16 10:00:09 -07:00
Mark Paluch
6eb338b0e3 Upgrade to Maven Wrapper 3.8.5.
See #1451
2022-06-03 09:39:32 +02:00
Mark Paluch
11469db726 Update CI properties.
See #1437
2022-06-03 09:34:36 +02:00
Christoph Strobl
0b045f2624 After release cleanups.
See #1397
2022-05-13 10:15:13 +02:00
Christoph Strobl
3549a64b50 Prepare next development iteration.
See #1397
2022-05-13 10:15:11 +02:00
Christoph Strobl
149473cf83 Release version 4.4 GA (2021.2.0).
See #1397
2022-05-13 10:05:08 +02:00
Christoph Strobl
bf56b85f8a Prepare 4.4 GA (2021.2.0).
See #1397
2022-05-13 10:04:21 +02:00
Michael Reiche
8847544025 Only project id and cas if required. (#1404)
Closes #1402.
2022-05-09 13:34:42 -07:00
Michael Reiche
b1272bc49a Fix Collection Support for Cache for non-Collection Server. (#1418)
Also fix test setup index flakiness on older servers.

Closes #1417.
2022-05-09 13:34:19 -07:00
Michael Reiche
1c308029a1 Update Couchbase Java SDK to 3.3.0. (#1427)
Closes #1425.
2022-05-09 13:32:32 -07:00
Michael Reiche
b4fac725d9 Only throw exception for id and cas not projected if needed. (#1395)
Closes #1394.
2022-05-09 13:20:42 -07:00
Michael Reiche
f6944a78fb Proper handling of metadata from CrudMethodMetadataPostProcessor. (#1393)
Retrieve the data before any reactive lambda.
When the method returns, in can immediately be removed from
the currentInvocation, and the previous data restored.

Closes #1392.
2022-05-09 13:19:15 -07:00
Michael Reiche
9fe8472b37 Check for _ID and _CAS as well as __id and __cas being projected from query and analytics. (#1390)
Closes #1389.
2022-05-09 13:18:53 -07:00
Michael Reiche
baf198c868 Fix javadoc from querydsl commit. (#1384)
Closes #1383.
2022-05-09 13:16:35 -07:00
Michael Reiche
4a42cba52e Support testing against Capella. (#1386)
Support testing against Capella. Also includes sample to
use Capella control-plane.

Closes #1385.
2022-05-09 13:12:51 -07:00
Michael Reiche
316e665fc1 Remove explicit dependency on annotations api. (#1403)
Closes #1400.
2022-04-20 09:30:11 -07:00
Michael Reiche
9347a5097a Quotes around bucket name in setup for collection tests. (#1416)
Closes #1415.
2022-04-19 18:30:15 -07:00
Michael Reiche
60ecf95def Bump Couchbase Java SDK to 3.2.6. (#1407)
Closes #1405.
2022-04-19 15:04:53 -07:00
Michael Reiche
62b566a6a1 Make Querydsl dependency "provided". (#1388)
Closes #1387.
2022-04-19 10:20:01 -07:00
Christoph Strobl
1efa3d08e6 After release cleanups.
See #1377
2022-04-19 11:21:18 +02:00
Christoph Strobl
61f78dec3e Prepare next development iteration.
See #1377
2022-04-19 11:21:16 +02:00
Christoph Strobl
4ac1fc72df Release version 4.4 RC1 (2021.2.0).
See #1377
2022-04-19 11:10:55 +02:00
Christoph Strobl
112452622e Prepare 4.4 RC1 (2021.2.0).
See #1377
2022-04-19 11:10:15 +02:00
Michael Reiche
c288d053c9 Querydsl support. (#1330)
Closes #1288.
2022-03-31 08:04:17 -07:00
Mark Paluch
99b969833c Update build triggers.
See #1377
2022-03-25 13:24:02 +01:00
Greg L. Turnquist
cd86a77230 After release cleanups.
See #1351
2022-03-21 10:20:33 -05:00
Greg L. Turnquist
354d2704a2 Prepare next development iteration.
See #1351
2022-03-21 10:20:31 -05:00
Greg L. Turnquist
b217f3699e Release version 4.4 M4 (2021.2.0).
See #1351
2022-03-21 10:09:34 -05:00
Greg L. Turnquist
a9fa0dc83e Prepare 4.4 M4 (2021.2.0).
See #1351
2022-03-21 10:07:09 -05:00
Michael Reiche
fe59e0c945 Fix cache to use collections part 2. (#1373)
Closes #1369.
2022-03-15 20:52:34 -07:00
Michael Reiche
13d8b6dbc7 Fix cache.clear() to use collection. (#1371)
Closes #1369.

Co-authored-by: Michael Reiche <michael.reiche@couchbase.com>
2022-03-15 20:13:07 -07:00
Mark Paluch
bd80977e6f Use Java 8 to build snapshots for Artifactory.
Closes #1352
2022-03-15 14:17:28 +01:00
Michael Reiche
3ec3a3080a Support derived queries on repositories defined with an abstract entity class. (#1366)
Motivation:
Currently an abstract entity class specified in the repository definition can
be used for the predicate typeKey = typeAlias(of abstract entity class) in
queries. Since documents are stored with typeKey = typeAlias(of concrete class)
those queries will never match any documents.  To allow this to work,
all of the abstract entity class an all concrete subclasses must use the
same typeAlias.

Once those documents are found, regardless of their concrete class,
they will all have the same typeKey = typeAlias, instead of having the
typeAlias specific to the concrete class. Additional information in
the stored document is needed to identify the concrete class (subtype
in the example test case), as well as a TypeMapper to interpret that
 information.

Changes:
This allows a common TypeAlias to be used for the purpose of the predicate
typeKey = typeAlias, and the determination of the concrete type by
implementing an AbstractingMappingCouchbaseConverter that inspects the
'subtype' property.

Closes #1365.

Co-authored-by: Michael Reiche <michael.reiche@couchbase.com>
2022-03-14 09:37:51 -07:00
Michael Reiche
d9327ceea2 Fix update to cache documentation. (#1359)
Closes #1358.
2022-02-22 10:09:25 -08:00
Michael Reiche
5804dd5a7e Reinstate CouchbaseCache documentation. (#1357)
Closes #1356.
2022-02-22 09:56:53 -08:00
Mark Paluch
fedd4c4054 Update CI properties.
See #1351
2022-02-22 14:09:33 +01:00
Mark Paluch
9b97cdcd29 Upgrade to Maven Wrapper 3.8.4.
See #1355
2022-02-22 13:59:13 +01:00
Mark Paluch
c9a4b185ae Use Java 17 to build snapshots for Artifactory.
Closes #1352
2022-02-22 08:44:51 +01:00
Mark Paluch
1539b9eb11 After release cleanups.
See #1307
2022-02-18 11:15:41 +01:00
Mark Paluch
2d3d090c5b Prepare next development iteration.
See #1307
2022-02-18 11:15:40 +01:00
Mark Paluch
8561b185d5 Release version 4.4 M3 (2021.2.0).
See #1307
2022-02-18 11:09:11 +01:00
Mark Paluch
9307c6ff97 Prepare 4.4 M3 (2021.2.0).
See #1307
2022-02-18 11:08:48 +01:00
Michael Reiche
25ecdbe6b1 Fix comment. (#1348)
Closes #1343.
2022-02-16 14:18:28 -08:00
Michael Reiche
83f55b1bda Allow CouchbaseCacheConfiguration to set collection. (#1344)
Closes #1343.
2022-02-16 09:32:14 -08:00
Michael Reiche
1fcd252b68 Translate CasMismatchException to OptimisticLockingFailureException. (#1341)
Translate CasMismatchException to OptimisticLockingFailureException
instead of DataIntegrityViolationException.  CasMismatchException is
a ConcurrencyFailureException which is a TransientDataAccessException.
Versus DataIntegrityViolation, which is a NonTransientDataAccessException.

Closed #1339.
2022-02-15 11:38:25 -08:00
Michael Reiche
fc075ccdeb Add collections support to N1qlJoin. (#1333)
The scope for the entity can come from an option, a method annotation,
an annotation on the repository or an annotation on the entity class.
All these possibilities are handle by PseudoArgs in the
OperationSupport implementation. That scope/collection are passed
into decodeEntity(). The scope/collection of the child can only come
from an annotation on the entity class. The scope/collection of the
parent and child are uses as follows:

1) Both the parent and the chold have non-default collections
It's possible that the scope for the parent was set with an annotation on
a repository method, the entity class or the repository class or a query
option. Since there is no means to set the scope of the child class by the
method, repository class or query option (only the annotation) we assume
that the (possibly) dynamic scope of the entity would be a better choice
as it is logical to put collections to be joined in the same scope.

2) The parent has a collection (and therefore a scope as well), but the
child  does not have a collection. Use the lhScope and lhCollection for
the entity.  The child is just the bucket.

3) The parent does not have a collection (or scope), but child does have a
collection. Using the same (default) scope for the child would mean
specifying a non-default collection in a default scope - which is not
allowed. So use the scope and collection from the child class.

4) Neither have collections, just use the bucket.

Closes #1325.
2022-02-15 11:37:54 -08:00
Greg L. Turnquist
07c37ed2e6 Update CI properties.
See #1307
2022-02-15 08:59:51 -06:00