How to query an @Any relationship using only the type?

I’m trying to run a query like this:

TypedQuery<SourceAssetRequirement> q = HBUtil.getSession()
  .createQuery(
    "from SourceAssetRequirement where sourceAsset = :sourceAsset and type(requireable) = :requireableType", 
    SourceAssetRequirement.class
  );
q.setParameter("sourceAsset", sourceAsset);
q.setParameter("requireableType", requireableClass);
return q.getResultList();

but getting the error “De-referencing parts of an ANY mapping, other than the key, is not supported”

My SourceAssetRequirement class has this relationship:

@Any
  @AnyDiscriminator(DiscriminatorType.STRING)
  @AnyDiscriminatorValues({
          @AnyDiscriminatorValue(discriminator = "handset", entity = Handset.class),
          @AnyDiscriminatorValue(discriminator = "operating_system", entity = OperatingSystem.class),
          @AnyDiscriminatorValue(discriminator = "carrier", entity = Carrier.class),
          @AnyDiscriminatorValue(discriminator = "subscriber", entity = Subscriber.class),
          @AnyDiscriminatorValue(discriminator = "asset_category", entity = AssetCategory.class)}
          )
  @AnyKeyJavaClass(Integer.class)
  @Column(name = "requireable_type")
  @JoinColumn(name = "requireable_id")
  public Requireable getRequireable() {
    return requireable;
  }

I’m trying to find all SourceAssetRequirements that have a requireable of “carrier”, for example. I can obviously write a trivial native query, but have been unable to get Hibernate to produce the query. Any help? Or is it truly not supported?

As you figured out, you are blocked by [HHH-15323] - Hibernate JIRA which will be fixed with the release of 6.1.2.Final next week.