What is the way to create DAO entity with a pre-defined value for a foreign key reference?
Open
documentation
- Dominant language
- Kotlin
- Stars
- 9.3k
- Forks
- 798
- Avg merge
- 4d 2h
- Merged PRs (30d)
- 26
Description
For instance, here's a sample from readme:
```kotlin
class User(id: EntityID) : IntEntity(id) {
companion object : IntEntityClass(Users)
var name by Users.name
var city by City referencedOn Users.city
var age by Users.age
}
```
Suppose I know `id` for `"St. Petersburg"` city is 42.
How could I create a user without loading the city?
```kotlin
User.new {
name = "a"
city = 42 // <-- ??? is there a way to specify the value without loading the city first?
age = 5
}
```
Contributor guide
Assessment
This issue has not been assessed yet.