How do I query UUIDs stored as binary in a database (JPA/Hibernate/MySQL)
问题 I have a Java/JPA/Hibernate/MySQL based app. I want to use UUIDs for object identity, however I want to ensure database performance does not suffer. I found this great blog posting JPA and UUID Primary Keys which gets me some of the way there. Notice how the storage of the UUID is optimized by storing it in binary form (versus the string representation. It solves part of the problem, because now we can insert objects efficiently into the database. However, now I have an issue when I want to