java - 过滤器中的自定义 propertyConverter 在 Neo4j OGM 中被覆盖
问题描述
我在 Neo4j OGM 中手动设置过滤器的 propertyConverter。
filter.setPropertyConverter(new EnumArrayStringConverter(VendorCostStatus.class));
filters.add(filter);
但是当我调用 session.loadAll(DomainClass.class , filters) 时,它被LoadByTypeDelegate.loadAll(Class<T> type, Filters filters)
但是随后 LoadByTypeDelegate 通过调用覆盖过滤器的 propertyConverter
resolvePropertyAnnotations(Class entityType, Iterable<Filter> filters)
并设置域类中属性的默认转换器。
谁能告诉我如何让 neo4j-ogm 使用过滤器中提供的自定义属性转换器?我想ComparisonOperator.IN
用于枚举属性
解决方案
设置您自己的属性转换器已被弃用,无论如何,我相信它从来没有以这种意图构建。这似乎是一个不应该暴露但当时却暴露的api。
推荐阅读
- java - TestRestTemplate HttpHostConnectException:连接到 localhost:8082 [localhost/127.0.0.1] 失败:连接被拒绝
- javascript - 将八进制或十进制数转换为十进制字符串
- powershell - Powershell:需要获取事件查看器日志
- php - 如何使用 fetch 将数据发布到 functions.php
- excel - Excel VBA通过excel电源查询使用动态文件路径自动更新表单图像
- java - ExpoPlayer 无法获取网址
- unity3d - 检查器中 UnityAction 的序列化字段
- java - CodenameOne - 编码 HTML 字符串
- triggers - 詹金斯触发器不在管道中工作
- firebase - 在 noSQL db (firestore) 中为资产存储大量文件列表