Permalink
Browse files

Do not generate constructor methods for more than 254 columns

The JVM has a limit of 254 parameters for a method.
  • Loading branch information...
szeiger committed Mar 14, 2017
1 parent 1ad8272 commit 7648411a48241ef5ae1950269c666cda69021445
Showing with 3 additions and 1 deletion.
  1. +3 −1 slick-codegen/src/main/scala/slick/codegen/AbstractSourceCodeGenerator.scala
@@ -81,7 +81,9 @@ abstract class AbstractSourceCodeGenerator(model: m.Model)
(if(caseClassFinal) "final " else "") +
s"""case class $name($args)$prns"""
} else {
s"""
if(columns.size > 254)
s"type $name = $types" // constructor method would exceed JVM parameter limit
else s"""
type $name = $types
/** Constructor for $name providing default values if available in the database schema. */
def $name($args): $name = {

0 comments on commit 7648411

Please sign in to comment.