Commit Graph

901 Commits

Author SHA1 Message Date
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
Greg L. Turnquist
c814a1067c Update CI to JDK 16.
See #1104.
2021-05-13 15:41:12 -05: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
Greg L. Turnquist
29766bfbff Authenticate with artifactory.
See #1117.
2021-04-20 10:25:29 -05:00
Greg L. Turnquist
d75273c0f7 Migrate to main branch.
See #1117.
2021-04-15 12:49:20 -05:00
Mark Paluch
f4c586d0a7 After release cleanups.
See #1117
2021-04-14 14:30:16 +02:00
Mark Paluch
1246036a0d Prepare next development iteration.
See #1117
2021-04-14 14:30:12 +02:00
Mark Paluch
bc58fa34d8 Release version 4.2 GA (2021.0.0).
See #1117
2021-04-14 14:18:49 +02: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
Michael Reiche
19ef1dd7b6 Upgrade to Couchbase Java SDK 3.1.4. (#1123)
Upgrade to Couchbase Java SDK 3.1.4.

Closes #1122.
Original pull request #1123.

Co-authored-by: mikereiche <michael.reiche@couchbase.com>
2021-04-13 06:30:26 -07: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
8a59d2bfda After release cleanups.
See #1086
2021-03-31 17:24:06 +02:00
Mark Paluch
df71894ec7 Prepare next development iteration.
See #1086
2021-03-31 17:24:04 +02:00
Mark Paluch
edfc8775db Release version 4.2 RC1 (2021.0.0).
See #1086
2021-03-31 17:05:09 +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
Michael Reiche
08c7a5c7b4 Update versions to correct values.
Closes #1105.

Co-authored-by: mikereiche <michael.reiche@couchbase.com>
2021-03-30 17:32:22 -04:00
Yanming Zhou
57aa3ff70e Fix indent.
Closes 1116.
2021-03-30 17:29:39 -04:00
Mark Paluch
7cb1da0c1c After release cleanups.
See #1099
2021-03-17 11:30:31 +01:00
Mark Paluch
4da304a501 Prepare next development iteration.
See #1099
2021-03-17 11:30:29 +01:00
Mark Paluch
2983abc372 Release version 4.2 M5 (2021.0.0).
See #1099
2021-03-17 11:17:50 +01: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
03c96d96e1 After release cleanups.
See #1090
2021-02-18 11:35:22 +01:00
Christoph Strobl
aaaafe12f9 Prepare next development iteration.
See #1090
2021-02-18 11:35:21 +01:00
Christoph Strobl
8fd81e0c62 Release version 4.2 M4 (2021.0.0).
See #1090
2021-02-18 11:25:13 +01: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