Skip to content

Commit

Permalink
feat: set the primary key to be created immediately instead of an ind…
Browse files Browse the repository at this point in the history
…irection through lazy
  • Loading branch information
GiantTreeLP committed Mar 10, 2024
1 parent 23320fc commit 4734d67
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import org.jetbrains.exposed.sql.Table
import org.jetbrains.exposed.sql.vendors.currentDialect

open class SnowflakeIdTable : IdTable<Snowflake>() {
override val id = snowflake("id").entityId()
final override val id = snowflake("id").entityId()

override val primaryKey by lazy { super.primaryKey ?: PrimaryKey(id) }
override val primaryKey = PrimaryKey(id)
}

open class SnowflakeEntity(id: EntityID<Snowflake>) : Entity<Snowflake>(id)
Expand Down

0 comments on commit 4734d67

Please sign in to comment.