[jOOQ/jOOQ#12168] Deeply nested MULTISET produce quoted JSON in MariaDB

This commit is contained in:
Lukas Eder 2021-07-13 17:32:04 +02:00
parent 4bae0a5129
commit d46b8daecf
2 changed files with 3 additions and 3 deletions

View File

@ -23843,7 +23843,7 @@ public class DSL {
* {@link SelectForStep#forXML()}. jOOQ produces an XML encoding that is
* compatible with {@link DSLContext#fetchFromXML(String)}. Future jOOQ
* versions will make this format configurable according to
* {@link XMLFormat.RecordFormau}.</li>
* {@link XMLFormat.RecordFormat}.</li>
* <li>{@link NestedCollectionEmulation#NATIVE}: A few dialects have native
* support for MULTISET.</li>
* <li>{@link NestedCollectionEmulation#DEFAULT}: By default, jOOQ chooses

View File

@ -185,11 +185,11 @@ implements
// Workaround for https://jira.mariadb.org/browse/MDEV-13701
if (entries.size() > 1) {
ctx.visit(jsonMerge(ctx, "{}", Tools.map(entries, e -> jsonObject(e), Field[]::new)));
ctx.visit(JSONEntryImpl.jsonMerge(ctx, "{}", Tools.map(entries, e -> jsonObject(e), Field[]::new)));
}
else if (!entries.isEmpty() && isJSONArray((first = entries.iterator().next()).value())) {
ctx.visit(jsonObject(
key(first.key()).value(jsonMerge(ctx, "[]", first.value()))
key(first.key()).value(JSONEntryImpl.jsonMerge(ctx, "[]", first.value()))
));
}
else