我想在三个表上创建一个内连接,例如:
Select m.*
From MessageInbox mi
Inner Join Message m ON mi.MessageId = m.Id
Left Join Message m2 ON
m.ConversationStarterMessageId = m2.ConversationStarterMessageId
AND m.MessageSendDate < m2.MessageSendDate
Where
m2.MessageSendDate IS NULL
AND mi.Deleted = 0
AND mi.RemovedFromInbox = 0
AND mi.UserId = ?userId
Order By m.MessageSendDate DESC
如何将其作为Ormlite查询编写?