cognitics edited a comment on Bug HHH-4591

Copy the needed relation-property to your entity. Mark as readonly with insertable = false, updatable = false.

@ManyToOne
@JoinColumn(name = "column_name", insertable = false, updatable = false)
private EntityX entityX;

now you can directly create the alias instead of using the composite id property.

criteria.createCriteria("entity.entityX", "entityX")
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira