When custom revision entity is placed in package which name started with "by" (I'm from Belarus) and later when I'm trying to retrieve revisions of my audited entity (NumericFieldValue in this example, but that's not important), the exception rises:
If I move my custom revision entity to another package (e.g. starting with "com") - everything works fine.
Hibernate 5.2.10, PostgreSQL 9.6
While Envers highlights this problem with how some of its queries are rendered, this can be observed directly in ORM because the ANTLR parser does not even like this query: