mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-22 16:03:15 +00:00
複合主キーの指定方法を修正
This commit is contained in:
parent
28319a60ba
commit
1212d5111b
|
@ -1,18 +1,18 @@
|
||||||
package one.nem.lacerta.source.database.entity;
|
package one.nem.lacerta.source.database.entity;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
import androidx.room.ColumnInfo;
|
import androidx.room.ColumnInfo;
|
||||||
import androidx.room.Entity;
|
import androidx.room.Entity;
|
||||||
import androidx.room.PrimaryKey;
|
import androidx.room.PrimaryKey;
|
||||||
|
|
||||||
@Entity(tableName = "toxi_document_tag")
|
@Entity(primaryKeys = {"document_id", "tag_id"}, tableName = "toxi_document_tag")
|
||||||
public class ToxiDocumentTagEntity {
|
public class ToxiDocumentTagEntity {
|
||||||
|
|
||||||
// 複合主キー
|
@NonNull
|
||||||
@PrimaryKey
|
|
||||||
@ColumnInfo(name = "document_id")
|
@ColumnInfo(name = "document_id")
|
||||||
public String documentId; // ドキュメントID
|
public String documentId; // ドキュメントID
|
||||||
|
|
||||||
@PrimaryKey
|
@NonNull
|
||||||
@ColumnInfo(name = "tag_id")
|
@ColumnInfo(name = "tag_id")
|
||||||
public String tagId; // タグID
|
public String tagId; // タグID
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user