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 |
Tags
- HTTP
- View
- CustomView
- Algorithm
- DataBinding
- lifecycle
- 코틀린
- kotlin
- recyclerview
- hilt
- 백준
- LiveData
- Android
- Navigation
- room
- 안드로이드
- ViewModel
- onLayout
- notification
- sqlite
- 알고리즘
- CoordinatorLayout
- AppBarLayout
- Coroutine
- activity
- 알림
- onMeasure
- Behavior
- CollapsingToolbarLayout
- BOJ
Archives
- Today
- Total
목록relation (1)
개발일지
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/Uf0iW/btqTJl44hY5/3yxzCuMhznHf1SXX4r1Q8k/img.png)
관계 데이터베이스에서 각 테이블마다 관계가 존재하는 것처럼 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