Skip to content

Commit

Permalink
HHH-5744 check ResultSet#hasNext in GUIDGenerator
Browse files Browse the repository at this point in the history
  • Loading branch information
Brett Meyer committed Oct 2, 2013
1 parent 5d9162d commit 13ea5a5
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -60,7 +60,9 @@ public Serializable generate(SessionImplementor session, Object obj)
ResultSet rs = session.getTransactionCoordinator().getJdbcCoordinator().getResultSetReturn().extract( st );
final String result;
try {
rs.next();
if ( !rs.next() ) {
throw new HibernateException( "The database returned no GUID identity value" );
}
result = rs.getString(1);
}
finally {
Expand Down

0 comments on commit 13ea5a5

Please sign in to comment.