From 3906c69a88efed970f5be304c0e3bbb80a95ecbd Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Fri, 2 May 2014 20:46:36 +0000 Subject: [PATCH] Liaison now handles exceptioning for us. --- .../com/samskivert/depot/impl/IdentityValueGenerator.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/main/java/com/samskivert/depot/impl/IdentityValueGenerator.java b/src/main/java/com/samskivert/depot/impl/IdentityValueGenerator.java index 3e4b85e..cab2523 100644 --- a/src/main/java/com/samskivert/depot/impl/IdentityValueGenerator.java +++ b/src/main/java/com/samskivert/depot/impl/IdentityValueGenerator.java @@ -38,11 +38,7 @@ public class IdentityValueGenerator extends ValueGenerator public int nextGeneratedValue (Connection conn, DatabaseLiaison liaison, Statement stmt) throws SQLException { - Integer id = liaison.lastInsertedId(conn, stmt, _dm.getTableName(), _fm.getColumnName()); - if (id == null) throw new SQLException( - "Unable to obtain last inserted id [table=" + _dm.getTableName() + - ", column=" + _fm.getColumnName() + "]"); - return id; + return liaison.lastInsertedId(conn, stmt, _dm.getTableName(), _fm.getColumnName()); } @Override // from ValueGenerator