custom propertyConverter in filter is getting overridden in Neo4j OGM

↘锁芯ラ 提交于 2020-03-05 03:06:08

问题


I am manually setting propertyConverter of a filter in Neo4j OGM.

filter.setPropertyConverter(new EnumArrayStringConverter(VendorCostStatus.class));
filters.add(filter);

But then when I call session.loadAll(DomainClass.class, filters), it is picked by LoadByTypeDelegate.loadAll(Class<T> type, Filters filters)

But then LoadByTypeDelegate overrides the propertyConverter of the filter by calling

resolvePropertyAnnotations(Class entityType, Iterable<Filter> filters)

and sets the default converter of the property in the domain class.

Could anyone please tell me how to make neo4j-ogm use the custom property converter provided in the filter? I want to use ComparisonOperator.IN for enum attributes


回答1:


Setting your own property converter is deprecated, and anyway, I believe it was never built with that intention. It seems to be an api that should not have been exposed but was at the time.



来源:https://stackoverflow.com/questions/59625855/custom-propertyconverter-in-filter-is-getting-overridden-in-neo4j-ogm

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!