Commit Graph

1016 Commits

Author SHA1 Message Date
Michael Reiche
dbdbc03424 Fix Collection Support for Cache for non-Collection Server. (#1418)
Also fix test setup index flakiness on older servers.

Closes #1417.
2022-04-19 19:38:51 -07:00
Michael Reiche
313fa04545 Bump Couchbase Java SDK to 3.2.6. (#1408)
Closes #1406.
2022-04-19 15:05:07 -07:00
Michael Reiche
d7326e4c19 Only throw exception for id and cas not projected if needed. (#1395)
Closes #1394.
2022-04-18 15:06:56 -07:00
Michael Reiche
fd88011f8f 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-04-15 14:58:11 -07:00
Michael Reiche
5994b2bd22 Check for _ID and _CAS as well as __id and __cas being projected from query and analytics. (#1390)
Closes #1389.
2022-04-14 07:52:25 -07:00
Michael Reiche
765df0fa90 Make Querydsl dependency "provided". (#1388)
Closes #1387.
2022-04-11 09:48:24 -07:00
Michael Reiche
ddfbc1f91d Support testing against Capella. (#1386)
Support testing against Capella. Also includes sample to
use Capella control-plane.

Closes #1385.
2022-04-08 14:36:02 -07:00
Michael Reiche
ab0bd5cfcd Fix javadoc from querydsl commit. (#1384)
Closes #1383.
2022-03-31 09:19:43 -07:00
Michael Reiche
d29956f286 Querydsl support. (#1330)
Closes #1288.
2022-03-31 08:57:04 -07:00
Mark Paluch
9d449fa5e8 Update build triggers.
See #1380
2022-03-25 13:24:31 +01:00
Mark Paluch
a0da716901 After release cleanups.
See #1378
2022-03-22 14:07:39 +01:00
Mark Paluch
a996da6464 Prepare next development iteration.
See #1378
2022-03-22 14:07:37 +01:00
Mark Paluch
1b8bf6ff74 Release version 5.0 M3 (2022.0.0).
See #1378
2022-03-22 14:00:24 +01:00
Mark Paluch
52cc6bbbac Prepare 5.0 M3 (2022.0.0).
See #1378
2022-03-22 14:00:03 +01:00
Mark Paluch
1384f0c459 After release cleanups.
See #1302
2022-03-21 16:44:42 +01:00
Mark Paluch
ab8be9ab45 Prepare next development iteration.
See #1302
2022-03-21 16:44:40 +01:00
Mark Paluch
38ccce2142 Release version 5.0 M2 (2022.0.0).
See #1302
2022-03-21 16:35:09 +01:00
Mark Paluch
8e0d791f20 Prepare 5.0 M2 (2022.0.0).
See #1302
2022-03-21 16:34:38 +01:00
Michael Reiche
01a211c443 Fix cache to use collections part 2. (#1373)
Closes #1369.
2022-03-15 20:57:46 -07:00
Michael Reiche
f80b997424 Fix cache.clear() to use collection. (#1371)
Closes #1369.

Co-authored-by: Michael Reiche <michael.reiche@couchbase.com>
2022-03-15 20:57:34 -07:00
Michael Reiche
56c031ecc1 Reinstate CouchbaseCache documentation. (#1357)
Closes #1356.
2022-03-14 11:49:53 -07:00
Michael Reiche
6dc19ede69 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 11:06:08 -07:00
Michael Reiche
dcd0a18e90 Fix update to cache documentation. (#1359)
Closes #1358.
2022-03-14 10:57:38 -07:00
Mark Paluch
416e770f1e Update CI properties.
See #1302
2022-02-22 14:10:52 +01:00
Michael Reiche
b2644a00ed Fix comment. (#1348)
Closes #1343.
2022-02-16 14:20:06 -08:00
Michael Reiche
8e02981752 Accomodate changes to springframework repository interfaces. (#1347)
Closes #1346.
2022-02-16 12:33:10 -08:00
Michael Reiche
dae04813d2 Allow CouchbaseCacheConfiguration to set collection. (#1344)
Closes #1343.
2022-02-16 11:21:59 -08:00
Michael Reiche
34f4733b70 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-16 11:21:33 -08:00
Michael Reiche
2e49741680 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-16 11:21:09 -08:00
Michael Reiche
b04b95a027 Add mechanism for save to do one of insert, replace or upsert. (#1316)
Closes #1277.
2022-02-16 11:17:46 -08:00
Michael Reiche
35a06717a8 Collection support for predicates on meta fields. (#1338)
When a derived query is being created and there is a predicate on
a meta-field ( meta().id, cas, expiry), translate that field
(i.e. id -> meta().id) *without* the bucket or collection name,
as it might apply to a collelction which we do not know yet
(for instance, if there is a withCollection() specified)..
This is fine, because in a derived query, meta() without the
bucket or collection name is unambigous.
2022-02-16 10:56:44 -08:00
Michael Reiche
bcbcd5cb73 Make withDurability() return WithScope type for all operations. (#1340)
Some of the operations were mistakenly declared to return a
WithCollection type, making it impossible to call the inScope()
method.

Closes #1329.
2022-02-16 10:55:47 -08:00
Michael Reiche
8eb7231965 Bump Couchbase SDK to 3_2_5 on 5_0_x. (#1345)
Closes #1337.
2022-02-16 10:54:42 -08:00
Michael Reiche
20b59b3772 Have tests remove the documents they insert. (#1336)
Closes #1335.
2022-02-16 10:41:46 -08:00
Michael Reiche
e3fed4c7d6 Make FindByAnalytics count the same as FindByQuery. (#1334)
Closes #1331.
2022-02-16 10:40:37 -08:00
Oliver Drotbohm
4feda42a59 Adapt to changes in entity creation metadata APIs in Spring Data Commons. 2022-02-15 17:45:10 +01:00
Greg L. Turnquist
109bc6941a Update CI properties.
See #1302
2022-02-15 09:00:21 -06:00
Michael Reiche
5dc15e98fe Fix slice support. (#1324)
Fix slice support. Also discontinue use of deprecated class.

Closes #1323.
2022-02-08 10:54:30 -08:00
Michael Reiche
2804abe194 Restore projection of class. (#1319)
Restore projection of class in queries. This is necessary for abstract repositories.

Closes #1315.
2022-02-08 10:39:52 -08:00
Michael Reiche
1485ce4754 Fix CasMismatch documentation. (#1320)
Closes #1314.
2022-02-08 10:30:47 -08:00
Michael Reiche
416ce9e843 Expose template getScope(), getCollection() and potentiallyConvertRuntimeException. (#1317)
Closes #1310.
2022-02-08 10:27:17 -08:00
Michael Reiche
76cf013778 Fix regression in IN operator. (#1309)
The regression occurred in changes for https://issues.couchbase.com/browse/MB-26606.

Closes #1308.
2022-02-08 10:23:48 -08:00
Michael Reiche
d716bbcad3 Allow caching null objects. (#1303)
Closes #939.

Co-authored-by: mikereiche <michael.reiche@couchbase.com>
2022-02-08 10:17:39 -08:00
Michael Reiche
5b959e7a3f Copy sort from pageable to query. (#1305)
Closes #1304.
2022-02-08 10:00:04 -08:00
Mark Paluch
82d022a7b6 Polishing.
Extract Docker and Artifactory credentials into properties file.

See #1313
2022-02-07 08:35:52 +01:00
Greg L. Turnquist
ab0ca0855a Externalize build properties.
See #1313.
2022-02-07 08:35:33 +01:00
Mark Paluch
cff515beb7 After release cleanups.
See #1289
2022-01-14 14:43:24 +01:00
Mark Paluch
96011e6b57 Prepare next development iteration.
See #1289
2022-01-14 14:43:20 +01:00
Mark Paluch
03295f1f8f Release version 5.0 M1 (2022.0.0).
See #1289
2022-01-14 14:35:11 +01:00
Mark Paluch
c8327647e6 Prepare 5.0 M1 (2022.0.0).
See #1289
2022-01-14 14:34:48 +01:00