Permalink
Browse files

Improve error messsage for returning a non-AutoInc column on unsuppor…

…ted DBMS
  • Loading branch information...
1 parent 898cb18 commit 6a617046b50a22268e88f82fbe7c814e1dc9a619 @trevorsibanda trevorsibanda committed Jul 16, 2016
Showing with 1 addition and 1 deletion.
  1. +1 −1 slick/src/main/scala/slick/jdbc/JdbcStatementBuilderComponent.scala
@@ -65,7 +65,7 @@ trait JdbcStatementBuilderComponent { self: JdbcProfile =>
ibr.table.baseIdentity+" != "+standardInsert.table.baseIdentity+")")
val returnOther = ibr.fields.length > 1 || !ibr.fields.head.options.contains(ColumnOption.AutoInc)
if(!capabilities.contains(JdbcCapabilities.returnInsertOther) && returnOther)
- throw new SlickException("This DBMS allows only a single AutoInc column to be returned from an INSERT")
+ throw new SlickException("This DBMS allows only a single column to be returned from an INSERT, and that column must be an AutoInc column.")
(ibr.fields.map(_.name), rconv.asInstanceOf[ResultConverter[JdbcResultConverterDomain, _]], returnOther)
}
}

0 comments on commit 6a61704

Please sign in to comment.