Commit Graph

606 Commits

Author SHA1 Message Date
Jens Schauder
08408b9c3f Prepare 4.3 M2 (2021.1.0).
See #1163
2021-08-12 15:02:57 +02:00
Michael Reiche
51b0d32636 Add Transient, Stream and Flux Pair tests. (#1175)
Closes #1174.
2021-08-11 14:45:01 -07:00
Michael Reiche
7d5e33ad71 Handle auto index on field path. (#1169)
Closes #1166.

Co-authored-by: mikereiche <michael.reiche@couchbase.com>
2021-08-11 10:29:05 -07:00
Michael Reiche
9e3bfe5b71 Omit annotations from the repository and domaintype in CrudMethodMetadata. (#1170)
Omit annotations from the repository and domaintype in
CrudMethodMetadata as they may be different for the same method.
The annotations from the repository and domaintype are obtained directly
in CouchbaseRepositoryBase.

Closes #1168.

Co-authored-by: mikereiche <michael.reiche@couchbase.com>
2021-08-10 20:17:12 -07:00
Michael Reiche
7cde6b919e Scopes and collections for repositories (#1149)
* Add support for scopes and collections for repositories.

Adds DynamicProxyable and DynamicInvocationHandler to
set scope/collection/options on PseudoArgs when calling
operations via repository interfaces.

Closes #963.

Co-authored-by: mikereiche <michael.reiche@couchbase.com>
2021-08-09 09:57:29 -07:00
Jens Schauder
f5866dc95a Prepare 4.3 M1 (2021.1.0).
See #1129
2021-07-16 14:08:59 +02:00
Jens Schauder
42f3827a0c Updated changelog.
See #1129
2021-07-16 14:08:53 +02:00
Jens Schauder
e16f91206a Updated changelog.
See #1152
2021-07-16 10:48:19 +02:00
Mark Paluch
c4954f660d Updated changelog.
See #1139
2021-06-22 16:07:28 +02:00
Mark Paluch
9b7415e78d Updated changelog.
See #1138
2021-06-22 15:29:54 +02:00
Michael Reiche
155663e66f Add missing hooks for callbacks. (#1142)
1) the previous change (#955) to CouchbaseAuditingRegister intended to register
 AuditingEntityCallback instead of AuditingEventListener but only changed the
name that AuditingEventListener was registered with. Since
AuditingEventListener does exactly the same thing as AuditingEntityCallback,
it behaved as those AuditingEntityCallback was being used.

2) It seems that the two mechanisms - EntityCallback and EventListener
both do more-or-less the same thing. I'm not sure why there are two
mechanisms to do the same thing.

3) Although the ReactiveAuditingEntityCallback mechanism is triggered
only for reactive operations and the non-reactive AuditingEntityCallback
is triggered only for non-reactive operations, the events are triggered
for both. Since there was a desire to have distinct callbacks for
reactive/non-reactive operations, I also made distinct events for
reactive/non-reactive operations.  However both the reactive and non-reactive
event mechanisms are triggered for either reactive and non-reactive operations,
so it is necessary for the mechanism to determine if it should act on the
event.

4) Although there is an AbstractCouchbaseEventListener that is extended by
LoggingEventListener and ValidatingEventListener, AuditingEventListener does
not extend it (maybe it should).

Closes #1074.

Co-authored-by: mikereiche <michael.reiche@couchbase.com>
2021-06-09 21:54:24 -04:00
Michael Reiche
67a7937cd2 Improve framework for custom mapping couchbase converter. (#1148)
1) change examples in Config to show creating repository mappings using
existing MappingCouchbaseConverter (which have customConversions /
BeanNames.COUCHBASE_CUSTOM_CONVERSIONS and applicationContext)
instead of creating their own and then adding the customConversion and
applicationContext.

2) replace @Autowired couchbaseObjectMapper with couchbaseObjectMapper()
to avoid the following when using @ComponentScan :
Unsatisfied dependency expressed through field 'couchbaseObjectMapper';
nested exception is org.springframework.beans.factory.
BeanCurrentlyInCreationException: Error creating bean with name
'couchbaseObjectMapper': Requested bean is currently in creation: Is
there an unresolvable circular reference?

3) remove unused members fro StringBasedN1qlQueryParser

Closes #1141.

Co-authored-by: mikereiche <michael.reiche@couchbase.com>
2021-06-09 21:36:45 -04:00
Jorge Rodríguez Martín
d172f395a8 Restore feature 'Inject translation service bean in CouchbaseTemplateSupport'.
The feature was accidentally removed when DATACOUCH-550 was reverted.

Closes #1140.
2021-06-03 17:42:49 -04:00
Michael Reiche
43889e6a9c Scope and collection API for template. (#1133)
Scope and Collection API for template.

Closes #963.
Original pull request: #1071.
2021-06-02 09:38:02 -04:00
Mark Paluch
5cf142d5f2 Updated changelog.
See #1127
2021-05-14 12:36:39 +02:00
Mark Paluch
3cce0b3b89 Updated changelog.
See #1126
2021-05-14 12:06:42 +02:00
Michael Reiche
a80663119c Expose ObjectMapper used by JsonSerializer (#1132)
Closes #1130.

Co-authored-by: mikereiche <michael.reiche@couchbase.com>
2021-05-05 12:16:38 -07:00
Michael Reiche
36de313466 Add override of toN1qlRemoveString() to StringQuery. (#1135)
Closes #1131.
Original pull request: #1135.

Co-authored-by: mikereiche <michael.reiche@couchbase.com>
2021-05-04 07:25:18 -07:00
Mark Paluch
1f41de4794 Prepare 4.2 GA (2021.0.0).
See #1117
2021-04-14 14:18:23 +02:00
Mark Paluch
c54c8d3c39 Updated changelog.
See #1117
2021-04-14 14:18:19 +02:00
Mark Paluch
70c618aa67 Updated changelog.
See #1118
2021-04-14 11:43:34 +02:00
Mark Paluch
60f56cbc8e Updated changelog.
See #1100
2021-04-14 11:17:42 +02:00
Jorge Rodríguez Martín
3f1cea174f Add support for reactive auditing and ReactiveEntityCallbacks.
Add support for reactive auditing and ReactiveEntityCallbacks.
Also, adapt CouchbaseAuditingRegistrar for support AuditingEntityCallback.

Closes #955.
Original pull request: #1102.

Co-authored-by: Carlos Espinado <carlosemart>
Co-authored-by: mikereiche <michael.reiche@couchbase.com>
2021-04-06 11:58:42 -04:00
Michael Reiche
5a04711a6d DefaultCouchbaseTypeMapper uses TypeAlias annotation if present.
DefaultCouchbaseTypeMapper uses TypeAlias annotation if present.
Test case also uncovered that TypeAlias was being ignored for
string queries.

Closes #1119.
Original pull request: #1120.

Co-authored-by: mikereiche <michael.reiche@couchbase.com>
2021-04-06 08:13:50 -07:00
Michael Reiche
9b848f6254 Specific message for string queries that do not project __id and __cas.
com.couchbase.client.core.error.CouchbaseException: query did not project __id.
 Either use #{#n1ql.selectEntity} or project __id and __cas :
 SELECT __cas, * from `b406ab45-ef95-441f-a318-76b8e8af2d76` where iata = $1

Closes #1097.
Original pull request: #1114.

Co-authored-by: mikereiche <michael.reiche@couchbase.com>
2021-04-06 08:03:02 -07:00
Mark Paluch
37587a1a0f Updated changelog.
See #1101
2021-03-31 18:30:46 +02:00
Mark Paluch
61dd699957 Prepare 4.2 RC1 (2021.0.0).
See #1086
2021-03-31 17:04:35 +02:00
Mark Paluch
c6945c95d4 Updated changelog.
See #1086
2021-03-31 17:04:32 +02:00
Michael Reiche
2e8d655751 Fix N1QLExpression keys.
Fix syntax of N1QLExpression keys.

Closes #1064.

Co-authored-by: mikereiche <michael.reiche@couchbase.com>
2021-03-31 06:10:42 -07:00
Michael Reiche
d16bbff4fe Support enum arguments on repository queries.
Support enum in AbstractCouchbaseConverter.convertForWriteIfNeeded()
and also call that from
MappingCouchbaseConverter.getPotentiallyConvertedSimpleWrite()

Closes #1069.
Original pull request: #1112.

Co-authored-by: mikereiche <michael.reiche@couchbase.com>
2021-03-30 17:32:22 -04:00
Michael Reiche
fe8d3feb48 Add QueryCriteria arrayContaining.
Add QueryCriteria arrayContaining which maps to n1ql array_containing.

Closes #1073.
Original pull request: #1109.

Co-authored-by: mikereiche <michael.reiche@couchbase.com>
2021-03-30 17:32:22 -04:00
Michael Reiche
4c428c5351 Use queryScanConsistency on reactive deleteAll().
It was present on non-Reactive, but missing from reactive.

Closes #1096.
Original pull request: #1108.

Co-authored-by: mikereiche <michael.reiche@couchbase.com>
2021-03-30 17:32:22 -04:00
Mark Paluch
ce868957f8 Prepare 4.2 M5 (2021.0.0).
See #1099
2021-03-17 11:17:27 +01:00
Mark Paluch
85e42974b3 Updated changelog.
See #1099
2021-03-17 11:17:24 +01:00
Mark Paluch
f36a1325a2 Updated changelog.
See #1091
2021-03-17 11:03:40 +01:00
Mark Paluch
2b6bd59d6a Updated changelog.
See #1084
2021-03-17 10:35:14 +01:00
Michael Reiche
cbcd048f3d Upgrade Couchbase Java SDK to 3.1.3. (#1098)
Closes #1079.

Co-authored-by: mikereiche <michael.reiche@couchbase.com>
2021-03-15 12:12:06 -07:00
Michael Reiche
a142f0895a Revert changes to public apis that were altered instead of just deprecated. (#1093)
Closes #1092.

Co-authored-by: mikereiche <michael.reiche@couchbase.com>
2021-03-05 17:01:58 -08:00
Christoph Strobl
7b2e2472a8 Prepare 4.2 M4 (2021.0.0).
See #1090
2021-02-18 11:24:46 +01:00
Christoph Strobl
1e897cb03a Updated changelog.
See #1090
2021-02-18 11:24:46 +01:00
Christoph Strobl
5b656b2a32 Updated changelog.
See #1085
2021-02-18 11:18:29 +01:00
mikereiche
ed31a8dbaf Complete revert of DATACOUCH-550.
The previous "Revert" only reverted CouchbaseTemplate resulting in compilation errors in master.

Closes #858
2021-02-18 08:50:45 +01:00
Michael Reiche
8c6598271a Revert "DATACOUCH-550 - Refactored the usage of CouchbasePersistentEntityIndexCreator. (#298)" (#1087)
This reverts commit 80bae4bf67.

Co-authored-by: mikereiche <michael.reiche@couchbase.com>
2021-02-17 09:19:06 -08:00
Christoph Strobl
432863c2ab Prepare 4.2 M3 (2021.0.0).
See #1044
2021-02-17 13:59:43 +01:00
Christoph Strobl
d39652703b Updated changelog.
See #1044
2021-02-17 13:59:40 +01:00
Christoph Strobl
7e80dee20a Updated changelog.
See #1043
2021-02-17 13:49:20 +01:00
Christoph Strobl
46900975b5 Updated changelog.
See #976
2021-02-17 11:34:26 +01:00
Christoph Strobl
30b5edbdd5 Updated changelog.
See #975
2021-02-17 10:58:26 +01:00
Michael Reiche
41ee1f99ee DATACOUCH-1066 - Make QueryCriteria key a N1qlExpression. (#1082)
This is a merge of mmonti's changeset into master. The changeset was made
on top of 4.1.x instead of master so it has a little catching up to do.

Co-authored-by: mikereiche <michael.reiche@couchbase.com>
2021-02-16 18:08:06 -08:00
Michael Reiche
6ab350df35 DATACOUCH-1041 - Add withCas() method to RemoveById. (#1051)
Add withCas() method to RemoveById.

Co-authored-by: mikereiche <michael.reiche@couchbase.com>
2021-02-16 15:16:12 -08:00