diff --git a/backend/data/src/main/kotlin/io/tolgee/model/ApiKey.kt b/backend/data/src/main/kotlin/io/tolgee/model/ApiKey.kt index 1db0d2a0bc..70691e1bb4 100644 --- a/backend/data/src/main/kotlin/io/tolgee/model/ApiKey.kt +++ b/backend/data/src/main/kotlin/io/tolgee/model/ApiKey.kt @@ -47,6 +47,7 @@ class ApiKey( * Encoded key with project id */ @Transient + @Column(insertable = false, updatable = false) var encodedKey: String? = null @ManyToOne diff --git a/backend/data/src/main/kotlin/io/tolgee/model/Pat.kt b/backend/data/src/main/kotlin/io/tolgee/model/Pat.kt index b2f54309a0..9d5ee7bd97 100644 --- a/backend/data/src/main/kotlin/io/tolgee/model/Pat.kt +++ b/backend/data/src/main/kotlin/io/tolgee/model/Pat.kt @@ -1,5 +1,6 @@ package io.tolgee.model +import jakarta.persistence.Column import jakarta.persistence.Entity import jakarta.persistence.ManyToOne import jakarta.persistence.Table @@ -24,6 +25,7 @@ class Pat( @Temporal(value = TemporalType.TIMESTAMP) var lastUsedAt: Date? = null, @Transient + @Column(insertable = false, updatable = false) var token: String? = null, ) : StandardAuditModel() { @ManyToOne diff --git a/backend/data/src/main/kotlin/io/tolgee/model/Project.kt b/backend/data/src/main/kotlin/io/tolgee/model/Project.kt index 4dcdfd9a82..af42a4cb99 100644 --- a/backend/data/src/main/kotlin/io/tolgee/model/Project.kt +++ b/backend/data/src/main/kotlin/io/tolgee/model/Project.kt @@ -93,6 +93,7 @@ class Project( override var avatarHash: String? = null @Transient + @Column(insertable = false, updatable = false) override var disableActivityLogging = false @OneToMany(orphanRemoval = true, mappedBy = "project") diff --git a/backend/data/src/main/kotlin/io/tolgee/model/StandardAuditModel.kt b/backend/data/src/main/kotlin/io/tolgee/model/StandardAuditModel.kt index 8bca59eeca..48e336409a 100644 --- a/backend/data/src/main/kotlin/io/tolgee/model/StandardAuditModel.kt +++ b/backend/data/src/main/kotlin/io/tolgee/model/StandardAuditModel.kt @@ -1,5 +1,6 @@ package io.tolgee.model +import jakarta.persistence.Column import jakarta.persistence.GeneratedValue import jakarta.persistence.GenerationType import jakarta.persistence.Id @@ -26,6 +27,7 @@ abstract class StandardAuditModel : AuditModel(), EntityWithId { override var id: Long = 0 @Transient + @Column(insertable = false, updatable = false) override var disableActivityLogging = false override fun equals(other: Any?): Boolean { diff --git a/backend/data/src/main/kotlin/io/tolgee/model/activity/ActivityRevision.kt b/backend/data/src/main/kotlin/io/tolgee/model/activity/ActivityRevision.kt index ff81687338..4daa00567a 100644 --- a/backend/data/src/main/kotlin/io/tolgee/model/activity/ActivityRevision.kt +++ b/backend/data/src/main/kotlin/io/tolgee/model/activity/ActivityRevision.kt @@ -99,9 +99,11 @@ class ActivityRevision : java.io.Serializable { * This flag is set to true when the instance is initialized by the interceptor. */ @Transient + @Column(insertable = false, updatable = false) var isInitializedByInterceptor: Boolean = false @Transient + @Column(insertable = false, updatable = false) var cancelledBatchJobExecutionCount: Int? = null companion object { diff --git a/backend/data/src/main/kotlin/io/tolgee/model/keyBigMeta/KeysDistance.kt b/backend/data/src/main/kotlin/io/tolgee/model/keyBigMeta/KeysDistance.kt index 793c84f99c..d4484fdb59 100644 --- a/backend/data/src/main/kotlin/io/tolgee/model/keyBigMeta/KeysDistance.kt +++ b/backend/data/src/main/kotlin/io/tolgee/model/keyBigMeta/KeysDistance.kt @@ -2,6 +2,7 @@ package io.tolgee.model.keyBigMeta import io.tolgee.model.AuditModel import io.tolgee.model.Project +import jakarta.persistence.Column import jakarta.persistence.Entity import jakarta.persistence.FetchType import jakarta.persistence.Id @@ -62,6 +63,7 @@ class KeysDistance( } @Transient + @Column(insertable = false, updatable = false) var new = false companion object {