Hibernate does not support byte[] for identifiers (nor does JPA, for that matter). Databases have highly inconsistent support for binary comparisons.