[#815] SQL Server fetching of IDENTITY value is broken

This commit is contained in:
Lukas Eder 2011-08-29 16:35:09 +00:00
parent 9904333b68
commit af0574e4c5

View File

@ -324,10 +324,8 @@ class InsertQueryImpl<R extends TableRecord<R>> extends AbstractStoreQuery<R> im
case DERBY:
case H2:
case MYSQL:
return connection.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS);
case SQLSERVER:
return connection.prepareStatement(sql, new String[] { "id_generated" });
return connection.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS);
// The default is to return all requested fields directly
default: {