问题
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