Remove embeddedset item by reference?

112 views
Skip to first unread message

Jonathan Rosen

unread,
Mar 24, 2014, 5:33:56 PM3/24/14
to orient-...@googlegroups.com
let's say i have an embedded set field "people" in record #5:12:

["bob", "jon"]

this doesnt seem to work:
update #5:12 remove people[0]

this does work however: update #5:12 remove "bob"

is there any way to remove items by reference, as in case #1?

Luca Garulli

unread,
Mar 25, 2014, 4:36:30 AM3/25/14
to orient-database
Hi,
You're right, we missed this simple syntax to remove item from Lists:

update #5:12 remove 0 <- there 0 is the position.

Please could you open a new issue for that?

Lvc@

 


--

---
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-databa...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jonathan Rosen

unread,
Mar 25, 2014, 9:39:55 PM3/25/14
to orient-...@googlegroups.com
Luca-

I'm confused. Are you saying that "update #5:12 remove 0" is the current syntax, or the suggested syntax?

update #5:12 remove 0 will not work, because you have to target the correct collection. For example, a single object could have an embeddedset called "people" and one called "things". The only way to remove from these collections is to reference them first, and the the position of the object to be removed.

i.e. update #5:12 remove people[0]...

i just want to get on the same page before i create the issue.

Red-0ne

unread,
Apr 18, 2014, 10:32:14 AM4/18/14
to orient-...@googlegroups.com
I can't find the issue about this problem and it doesn't seem to be resolved. Any update on that ?

Jonathan Rosen

unread,
Apr 18, 2014, 10:35:14 AM4/18/14
to orient-...@googlegroups.com
I asked Luca a question about this that he didn't respond to. I didn't create the issue because we never clarified how this needs to be fixed.


--

---
You received this message because you are subscribed to a topic in the Google Groups "OrientDB" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/orient-database/_yNVTB001G4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to orient-databa...@googlegroups.com.

Luca Garulli

unread,
Apr 20, 2014, 5:22:08 AM4/20/14
to orient-database
Hi,
Sorry for the delay. May you try:

update #5:12 remove people 0

Lvc@


--

---
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-databa...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages