All Downloads are FREE. Search and download functionalities are using the official Maven repository.

slick.additions.codegen.KeylessModelsCodeGenerator.scala Maven / Gradle / Ivy

The newest version!
package slick.additions.codegen

/** Omits the primary key field from generated model classes, unless the primary key isn't a single column.
  */
class KeylessModelsCodeGenerator extends ModelsCodeGenerator {
  override protected def columnConfigs(tableConfig: TableConfig) =
    super.columnConfigs(tableConfig)
      .filter(c => Seq(c.column.name) != tableConfig.tableMetadata.primaryKeys.map(_.column))
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy