问题描述
我在搜索 json 字段时遇到问题。任何帮助将不胜感激..这里是示例代码片段和我面临的错误
实体类
@TypeDef(name = "cardjsonb",typeClass = JsonBinaryType.class)
public class TransactionEntity {
@Type(type = "cardjsonb")
@Column(name = "card_details",columnDefinition = "jsonb")
private TransactionCardDetails cardDetails;
}
public class TransactionCardDetails {
private Date expiryDate; //MM-YYYY
private String cardOnName;
private String cardNumber;
}
规范片段
return (root,query,builder) -> builder.equal(
builder.function("json_extract_path_text",JsonBinaryType.class,root.get("cardDetails"),builder.literal("cardOnName")),builder.literal("David")
);
错误详情
ERROR 20628 --- [nio-8080-exec-2] o.h.engine.jdbc.spi.SqlExceptionHelper : ERROR: function json_extract_path_text(jsonb,character varying) does not exist
Hint: No function matches the given name and argument types. You might need to add explicit type casts.
Position: 1732
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)