HHH-5744 check ResultSet#hasNext in GUIDGenerator
This commit is contained in:
parent
bd93745aec
commit
1755f00260
|
@ -60,7 +60,9 @@ public class GUIDGenerator implements IdentifierGenerator {
|
|||
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 {
|
||||
|
|
Loading…
Reference in New Issue