OPENJPA-349: Validate the row if auto-assigned identity happens to be only column.

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@677145 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Pinaki Poddar 2008-07-16 03:55:45 +00:00
parent 89695ec253
commit 6e3aca63ec
1 changed files with 4 additions and 1 deletions

View File

@ -675,8 +675,11 @@ public class RowImpl
throws SQLException {
// never set auto increment columns and honor column defaults
if (_action == ACTION_INSERT) {
if (col.isAutoAssigned())
if (col.isAutoAssigned()) {
// OPENJPA-349: validate because this can be the only column
setValid(true);
return;
}
if (!overrideDefault && val == null
&& col.getDefaultString() != null)
return;