With this sentence from your example: *create property User.activities embeddedlist*
queries worked again. Thank you! Is it possible to tell to OrientDb that I want *activities* sorted by activity.*day*? It would be nice if OrientDb automatically sort them when each activity is inserted. It is good too if orientDb returns user's activities sorted by day when the query is executed. Pablo On Tuesday, April 19, 2016 at 9:48:12 PM UTC-7, user.w...@gmail.com wrote: > > Hi pabloa, > > I tried your case with this structure and it works correctly for me: > > create class User extends V > create property User.userId integer > create index User.userId unique > create property User.activities embeddedlist > > > to insert the data: > > insert into User(userId,activities) values (23237,[{"@type":"d","@version" > :0,"data": "L.A", "type": "picnic", "day": 0}]) > > > The queries: > > select from V > > > > <https://lh3.googleusercontent.com/-Do63KBCne-o/VxcJNj9ry3I/AAAAAAAAACE/3KPC-NSkow0exbZEqG3SWOjugUsgxjlWACLcB/s1600/select.png> > > > > > SELECT userId, activities[type='excursion'].data as excursion, activities[ > type='picnic'].data as picnic > FROM User > UNWIND excursion, picnic > > > > <https://lh3.googleusercontent.com/-AxPNWhPsX10/VxcJymnr0wI/AAAAAAAAACM/LrR2tGDOXQwo0AqkqW1JBnPf5h37mq8sQCLcB/s1600/query.png> > > > Hope it helps > > > Regards, > > Michela > -- --- 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 orient-database+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.