Skip to content

Instantly share code, notes, and snippets.

View anadimisra's full-sized avatar
🏠
Working from home

Anadi Mishra anadimisra

🏠
Working from home
View GitHub Profile
@lifecoder
lifecoder / UniqueId.java
Created August 18, 2011 09:19
UniqueId (UUID) embedded primary key in JPA 2 (Hibernate) for MySQL
import java.io.Serializable;
import java.nio.ByteBuffer;
import java.util.Arrays;
import java.util.UUID;
import javax.persistence.Access;
import javax.persistence.AccessType;
import javax.persistence.Column;
import javax.persistence.Embeddable;