Copy the needed property relation to your entity.
@ManyToOne @JoinColumn(name = "column_name", insertable = false, updatable = false) private EntityX entityX;
now you can directy create the alias, instead of using the composite id property.
criteria.createCriteria("entity.entityX", "entityX")
Copy the needed property relation to your entity.
now you can directy create the alias, instead of using the composite id property.