Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- LiveData
- 백준
- View
- 코틀린
- sqlite
- Android
- 알림
- room
- ViewModel
- Navigation
- notification
- onLayout
- BOJ
- onMeasure
- CollapsingToolbarLayout
- CoordinatorLayout
- DataBinding
- CustomView
- HTTP
- recyclerview
- AppBarLayout
- kotlin
- lifecycle
- 안드로이드
- activity
- Algorithm
- Coroutine
- hilt
- 알고리즘
- Behavior
Archives
- Today
- Total
목록foreign (1)
개발일지

관계 데이터베이스에서 각 테이블마다 관계가 존재하는 것처럼 Room에도 관계를 설정할 수 있다. Drawer와 ToDo 의 1 : N관계 Drawer 관계에서 사용할 Column을 인덱싱한다. (PrimaryKey를 관계에서 사용할 경우 인덱싱을 할 필요가 없다.) @Entity( indices = [ Index(value = ["name"], unique = true) ] ) data class Drawer( @PrimaryKey(autoGenerate = true) var id: Long = 0L, var name: String = "", ) indices : Index를 나열한다 Index value : 인덱싱할 column unique : 고유값을 가지는지 설정 ToDo @Entity에서 fori..
Android (안드로이드)/Room
2021. 1. 17. 03:15