S
S
Shadrindmitry2020-04-15 22:55:34
Java
Shadrindmitry, 2020-04-15 22:55:34

How to execute a request with join in Room and collect everything in POJO?

How to execute a request with join in Room and collect everything in POJO? Tables: Message(chat_id, message_id, user_id, date), Attachment(id, chat_id, message_id, url, type)
Message has a composite key: chat_id, message_id.
It is necessary to collect POJO MessageJSON from the database (
chat_id: Int
message_id: Int
user_id: Int
attachments: ArrayList
)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ilya Pavlovsky, 2020-04-20
@TranE91

Make a selection and as a result you can create your own object with the necessary keys:
Help 1
Help 2

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question