[#3682] PostgreSQL INSERT .. RETURNING doesn't work with plain SQL table

This commit is contained in:
Lukas Eder 2014-10-14 10:23:52 +02:00
parent 7a0a3c82f3
commit a9b1b4fbfd

View File

@ -463,7 +463,12 @@ abstract class AbstractStoreQuery<R extends Record> extends AbstractQuery implem
ExecuteListener listener2 = new ExecuteListeners(ctx2);
ctx2.resultSet(rs);
returned = new CursorImpl<R>(ctx2, listener2, fieldArray(returning), null, false, true).fetch().into(getInto());
returned = new CursorImpl<R>(ctx2, listener2, fieldArray(returning), null, false, true).fetch();
// [#3682] Plain SQL tables do not have any fields
if (getInto().fields().length > 0)
returned = returned.into(getInto());
return result;
}
}