From 1212d5111bf479fcc29297045b60bd17983a9452 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Thu, 25 Jan 2024 16:22:54 +0900 Subject: [PATCH] =?UTF-8?q?=E8=A4=87=E5=90=88=E4=B8=BB=E3=82=AD=E3=83=BC?= =?UTF-8?q?=E3=81=AE=E6=8C=87=E5=AE=9A=E6=96=B9=E6=B3=95=E3=82=92=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../source/database/entity/ToxiDocumentTagEntity.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/src/main/java/one/nem/lacerta/source/database/entity/ToxiDocumentTagEntity.java b/source/src/main/java/one/nem/lacerta/source/database/entity/ToxiDocumentTagEntity.java index cf0720cf..3e01199c 100644 --- a/source/src/main/java/one/nem/lacerta/source/database/entity/ToxiDocumentTagEntity.java +++ b/source/src/main/java/one/nem/lacerta/source/database/entity/ToxiDocumentTagEntity.java @@ -1,18 +1,18 @@ package one.nem.lacerta.source.database.entity; +import androidx.annotation.NonNull; import androidx.room.ColumnInfo; import androidx.room.Entity; import androidx.room.PrimaryKey; -@Entity(tableName = "toxi_document_tag") +@Entity(primaryKeys = {"document_id", "tag_id"}, tableName = "toxi_document_tag") public class ToxiDocumentTagEntity { - // 複合主キー - @PrimaryKey + @NonNull @ColumnInfo(name = "document_id") public String documentId; // ドキュメントID - @PrimaryKey + @NonNull @ColumnInfo(name = "tag_id") public String tagId; // タグID }