Skip to content

Commit

Permalink
feat: add kaomojis mappedBy association in the Tag table (to Kaomoji …
Browse files Browse the repository at this point in the history
…table) (#10)

Signed-off-by: ablandel <[email protected]>
  • Loading branch information
ablandel committed Jun 12, 2024
1 parent 6a96437 commit c6352bb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Add the changes here.
### Updated

- Update of the dev tools configuration - removing of the broken bootRunDev `gradle` task
- Add `kaomojis` mappedBy association in the `Tag` table (to `Kaomoji` table)

### Fix

Expand Down
3 changes: 3 additions & 0 deletions src/main/kotlin/github/ablandel/anotherkaomoji/entity/Tag.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package github.ablandel.anotherkaomoji.entity

import jakarta.persistence.Entity
import jakarta.persistence.ManyToMany
import java.time.Instant

@Entity(name = "tag")
Expand All @@ -9,4 +10,6 @@ data class Tag(
override val id: Long? = null,
override var createdAt: Instant? = null,
override var updatedAt: Instant? = null,
@ManyToMany(mappedBy = "tags")
val kaomojis: Set<Kaomoji>? = null,
) : AbstractEntity()

0 comments on commit c6352bb

Please sign in to comment.