Adds query statements, which contains restrictions, which express the property that the id of the entity
with alias prefix1, is equal to the id of the entity with alias prefix2 (the entity is the same).

Adds query statements, which contains restrictions, which express the property that the id of the entity
with alias prefix1, is equal to the id of the entity with alias prefix2 mapped by the second mapper
(the second mapper must be for the same entity, but it can have, for example, prefixed properties).

Adds query statements, which contains restrictions, which express the property that part of the middle
entity with alias prefix1, is equal to part of the middle entity with alias prefix2 (the entity is the same).

Check if there is a Hibernate or JTA transaction in progress and,
if there is not, flush if necessary, make sure the connection has
been committed (if it is not in autocommit mode) and run the after
completion processing

JSR 175 annotation binder which reads the annotations from classes, applies the
principles of the EJB3 spec and produces the Hibernate configuration-time metamodel
(the classes in the org.hibernate.mapping package)