How get reverse field by ``Entity`` property
- Dominant language
- Kotlin
- Stars
- 9.3k
- Forks
- 798
- Avg merge
- 4d 2h
- Merged PRs (30d)
- 26
Description
```kotlin
object Posts : IntIdTable() {
val title = varchar("title", 50)
val content = text("content")
val author = reference("author", Users)
}
class Post(id: EntityID) : IntEntity(id) {
companion object : IntEntityClass(Posts)
var title by Posts.title
var content by Posts.content
var author by User referencedOn Posts.author
}
object Users : IntIdTable() {
val username = varchar("username", 50).uniqueIndex()
val email = varchar("email", 50).uniqueIndex()
}
class User(id: EntityID) : IntEntity(id) {
companion object : IntEntityClass(Users)
var username by Users.username
var email by Users.email
val posts by Post referrersOn Posts.author
}
```
Some example code was written above.
I searched issues, but there exist no results of same kind of question.
In this example, How get ``Posts::author``of ``User::posts`` by ``User::posts`` .
Please providing some example about ``User::posts`` api.
Contributor guide
Assessment
This issue has not been assessed yet.