When using a UUID as the object identifier, you can generate the IDs
right away and don't neet the Hibernate session to create the id for
you. If you're worried about size, it's a 128 bit binary, that's 16 bytes.
I am wondering why this article makes such a big deal of not using the
object identifier for the equals and hash code, if it is so easy with a
UUID??? |