Hibernate Envers does not work with Any type

Hibernate Envers appears not to work with org.hibernate.type.AnyType.
When @Any hibernate annotation is used to describe specific polymorphic mapping use case, auditing with Envers does not work out of the box.
With entity field defined as:

    @Any(
            metaDef = "PartyMetaDef",
            metaColumn = @Column( name = "dest_type" )
    )
    @JoinColumn( name = "dest_id" )
    private Party destination;

where Party is abstract class and finally comes in one of two flavors.
Actual party type is decided via PartyMetaDef, and ends up in dest_type (CHAR) column in database.
Actual parent entity id is stored in dest_id (LONG).

Now, for some reason Envers cannot work with this and gives

org.hibernate.MappingException: Type not supported for auditing: org.hibernate.type.AnyType, on entity MyEntity, property 'destination'.
at org.hibernate.envers.configuration.internal.metadata.AuditMetadataGenerator.throwUnsupportedTypeException(AuditMetadataGenerator.java:764) ~[hibernate-envers-5.4.32.Final.jar:5.4.32.Final]
	at org.hibernate.envers.configuration.internal.metadata.AuditMetadataGenerator.addValueInFirstPass(AuditMetadataGenerator.java:212) ~[hibernate-envers-5.4.32.Final.jar:5.4.32.Final]
	at org.hibernate.envers.configuration.internal.metadata.AuditMetadataGenerator.addValue(AuditMetadataGenerator.java:316) ~[hibernate-envers-5.4.32.Final.jar:5.4.32.Final]
	at org.hibernate.envers.configuration.internal.metadata.AuditMetadataGenerator.addProperties(AuditMetadataGenerator.java:350) ~[hibernate-envers-5.4.32.Final.jar:5.4.32.Final]

Hibernate and Envers versions are both 5.4.32.Final

PartyMetaDef is defined as:

@AnyMetaDefs(
        @AnyMetaDef( name= "PartyMetaDef", metaType = "string", idType = "long",
                metaValues = {
                        @MetaValue(value = "C", targetEntity = Contact.class),
                        @MetaValue(value = "W", targetEntity = Warehouse.class)
                }
        )
)

Both Contact and Warehouse inherit from Party abstract class.

Try updating to the latest Hibernate 5.6, as 5.4 is not supported.

Thanks for the response.
Did that, upgraded all services to use Hibernate 5.6.15. but message is still the same:

org.hibernate.MappingException: Type not supported for auditing: org.hibernate.type.AnyType, on entity…

It looks like a well formatted message i.e. maybe given feature is indeed missing?
Helpful info would be if there are any ways to circumvent this or info on future upgrades to deal with auditing polymorphic relation.

maybe given feature is indeed missing?

Maybe, yeah. Try searching in the issue tracker for feature requests. But either way, if you want new features, you’d have to upgrade to Hibernate 6.3 then as that is the only version which receives new features now.

Helpful info would be if there are any ways to circumvent this or info on future upgrades to deal with auditing polymorphic relation.

You can try to model the association differently for the purpose of auditing e.g.

@Column(name = "dest_type")
Character destType;
@Column(name = "dest_id")
Long destId;

and just keep that in sync with the destination mapping