Skip to content

Instantly share code, notes, and snippets.

View pmcdaniel's full-sized avatar

Patrick McDaniel pmcdaniel

View GitHub Profile
@pmcdaniel
pmcdaniel / keybase.md
Created August 13, 2015 01:08
Keybase Identity Verification

Keybase proof

I hereby claim:

  • I am pmcdaniel on github.
  • I am pmcdaniel (https://keybase.io/pmcdaniel) on keybase.
  • I have a public key whose fingerprint is 59CE A684 E2D7 CA40 80AC C652 554F A574 67DD A982

To claim this, I am signing this object:

@pmcdaniel
pmcdaniel / UuidIdentifierGenerator.groovy
Last active December 20, 2015 14:38
Drop in replacement for Hibernate (3.6)'s GUIDGenerator for ID columns that uses Java's UUID to generate the GUID if the database doesn't support the GUID generator. Useful for testing with in-memory databases that don't support GUID
package org.patrickmcdaniel.util
import groovy.util.logging.Log4j
import org.hibernate.HibernateException
import org.hibernate.engine.SessionImplementor
import org.hibernate.exception.JDBCExceptionHelper
import org.hibernate.id.IdentifierGenerator
import java.sql.PreparedStatement
import java.sql.ResultSet