objectbox / objectbox/objectbox-java
How to listen to the first of ToMany
Open
@greenrobot-team is already working on this.
Since Oct 1, 2018.
enhancement
- Dominant language
- Java
- Stars
- 4.6k
- Forks
- 311
- PR merge metrics
- No merged PRs in 30d
Description
@Entity
class Session {
@Id
var id: Long = 0
lateinit var messages: ToMany<Message>
}
In my app, there is a session list, we need to listen to the first of messages, but now I can't find any direct method to listen.
My question: Is there any simple workaround to listen?
BTW, now I need to add a extra field latestContent to solve this problem. Just as below.
@Entity
class Session {
@Id
var id: Long = 0
//when update messages, update this field
lateinit var latestContent: String
lateinit var messages: ToMany<Message>
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.