Hi all,

I have a model like this :
(User)->[SentMessage]->(message)->[MessageTo]->(ChatRoom)

and i want to retrieve only the 10 last messages In a given ChatRoom

for now i have the following request : 
SELECT out.date AS date, out.body AS body, out.senderId AS senderId, 
out.@this AS MessageId, in.@this AS ChatRoomId
FROM (SELECT EXPAND(INE()) FROM ChatRooms WHERE '#12:29' IN members) ORDER 
BY date DESC

How to limit the selected messages to 10 by Chatroom ?

Or maybe there is a better model for a multi-user chat ? But i'm new with 
graph databases and i'm unable to find it

cheers,
Z0mbie42
 

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to