Код: Выделить всё
cb.function(
JSONB_AGG_FUNCTION_NAME,
JsonNode.class,
someJoin.get(someField)
)
Код: Выделить всё
Projection (, com.fasterxml.jackson.databind.JsonNode node)
Код: Выделить всё
public class ExtendedPgDialect extends PostgreSQLDialect {
public static final String JSONB_AGG_FUNCTION_NAME = "jsonb_agg";
public ExtendedPgDialect() {
registerFunction(JSONB_AGG_FUNCTION_NAME,
new StandardSQLFunction(JSONB_AGG_FUNCTION_NAME, JsonNodeBinaryType.INSTANCE));
}
}
Также мы использовали (
Код: Выделить всё
JsonNodeBinaryTypeПодробнее здесь: https://stackoverflow.com/questions/798 ... ibernate-6
Мобильная версия