How to reference the discriminator column in HQL/JPQL

Is it possible to reference the discriminator column in a HQL/JPQL query? I’d like to update it.

UPDATE Animal SET type = 'DOG'

type is the column name of the discriminator column. It is not mapped in the entity (possible workaround?). Animal uses single table inheritance.

This used to work with Hibernate 5 but no longer does with Hibernate 6, resulting in this error:
org.hibernate.query.SemanticException: Could not interpret path expression 'type'

You can’t just change the type of an entity. It might be possible to map the type to a field in the entity with @Column(insertable = false, updatable = false) and update that column via a HQL DML statement, but know that you might be getting yourself into trouble when doing this. Also, you can use native SQL for this if you want.