Skip to content

Commit

Permalink
OutputHelpers: put profile in another base trait
Browse files Browse the repository at this point in the history
  • Loading branch information
szeiger authored and nafg committed Feb 26, 2023
1 parent 0b6cf9e commit b8ca33d
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions slick-codegen/src/main/scala/slick/codegen/OutputHelpers.scala
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,11 @@ trait ${container}Root {
package ${pkg}
// AUTO-GENERATED Slick data model
/** Stand-alone Slick data model for immediate use */
object ${container} extends ${container} {
val profile = $profile

object ${container} extends ${container}Profile with ${container}

trait ${container}Profile {
val profile: slick.jdbc.JdbcProfile = $profile
}

/** Slick data model trait for extension, choice of backend or usage in the cake pattern. (Make sure to initialize this late.) */
Expand All @@ -140,8 +143,10 @@ trait ${container}${parentType.map(t => s" extends $t").getOrElse("")} {
package ${pkg}
// AUTO-GENERATED Slick data model
/** Stand-alone Slick data model for immediate use */
object ${container} extends ${container} {
val profile = $profile
object ${container} extends ${container}Profile with ${container}

trait ${container}Profile {
val profile: slick.jdbc.JdbcProfile = $profile
}

/** Slick data model trait for extension, choice of backend or usage in the cake pattern. (Make sure to initialize this late.)
Expand Down

0 comments on commit b8ca33d

Please sign in to comment.