FilterDefinition constructor not accepting StandardBasicTypes


I am trying to create new FilterDefinition , but can not get how i need to specify type

This is not working

new FilterDefinition(
                        "user_id = :userId",
                        Map.of("userId", StandardBasicTypes.LONG)

Required type: Map<String,JdbcMapping>
Provided: Map<String,BasicTypeReference>

The version is 6.2.5

I “solved” it by

Map.of("userId", inFlightMetadataCollector.getTypeConfiguration().getBasicTypeRegistry().resolve(StandardBasicTypes.LONG))

Is it a better way to do this?

No. This is the way.