public Iterable<Vertex> findCollectionVertex(Collection c){ OSQLSynchQuery<ODocument> query = new OSQLSynchQuery<>("select from (traverse out_HAS from (select from Case where name = :cname ) while $depth <= 1) where name = :name"); Map<String,Object> params = new HashMap<>(); params.put("cname", c.getCase().getName()); params.put("name", c.getName());
Iterable<Vertex> list = graph.command(query).execute(params); return list; }
select from (traverse out_HAS from (select from Case where name = 'demo' ) while $depth <= 1) where name = 'telnet_cat_emial_list.pcap'
| @rid | @version | @class | name | in_HAS |
|---|---|---|---|---|
| #13:3 | 2 | Collection | telnet_cat_emial_list.pcap | [1] |
OSQLSynchQuery<ODocument> query = new OSQLSynchQuery<>("select from (traverse out_HAS from (select from Case where name = 'demo') while $depth <= 1) where name = 'telnet_cat_emial_list.pcap'"); OSQLSynchQuery<ODocument> query = new OSQLSynchQuery<>("select from (traverse * from (select from Case where name = ? ) while $depth <= 1) where name = ?"); List<ODocument> docs = graph.getRawGraph().command(query).execute(c.getCase().getName(), c.getName());Caused by: com.orientechnologies.orient.core.exception.OCommandExecutionException: Error on execution of command: sql.select from (traverse * from (select from Case where name = ? ) while $depth <= 1) where name = ? at com.orientechnologies.orient.core.storage.OStorageEmbedded.executeCommand(OStorageEmbedded.java:102) at com.orientechnologies.orient.core.storage.OStorageEmbedded.command(OStorageEmbedded.java:85) at com.orientechnologies.orient.core.sql.query.OSQLQuery.run(OSQLQuery.java:69) at com.orientechnologies.orient.core.sql.query.OSQLSynchQuery.run(OSQLSynchQuery.java:82) at com.orientechnologies.orient.core.query.OQueryAbstract.execute(OQueryAbstract.java:29) at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.command(ONetworkProtocolBinary.java:1320) at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.executeRequest(ONetworkProtocolBinary.java:330) at com.orientechnologies.orient.server.network.protocol.binary.OBinaryNetworkProtocolAbstract.execute(OBinaryNetworkProtocolAbstract.java:125) at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:45)Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 at java.util.ArrayList.rangeCheck(Unknown Source) at java.util.ArrayList.get(Unknown Source) at com.orientechnologies.orient.core.sql.filter.OSQLPredicate.bindParameters(OSQLPredicate.java:358) at com.orientechnologies.orient.core.sql.OCommandExecutorSQLResultsetAbstract.assignTarget(OCommandExecutorSQLResultsetAbstract.java:135) at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.assignTarget(OCommandExecutorSQLSelect.java:354) at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.executeSearch(OCommandExecutorSQLSelect.java:328) at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.execute(OCommandExecutorSQLSelect.java:313) at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.execute(OCommandExecutorSQLDelegate.java:57) at com.orientechnologies.orient.core.storage.OStorageEmbedded.executeCommand(OStorageEmbedded.java:96) ... 8 more OSQLSynchQuery<ODocument> query = new OSQLSynchQuery<>("select from Case where name = :cname"); Map<String, String> params = new HashMap<>(); params.put("cname", c.getCase().getName()); List<ODocument> docs = graph.getRawGraph().command(query).execute(params);
OSQLSynchQuery<ODocument> query = new OSQLSynchQuery<>("traverse * from (select from Case where name = :cname"); Map<String, String> params = new HashMap<>(); params.put("cname", c.getCase().getName()); List<ODocument> docs = graph.getRawGraph().command(query).execute(params);
OSQLSynchQuery<ODocument> query = new OSQLSynchQuery<>("traverse * from (select from Case where name = ?"); List<ODocument> docs = graph.getRawGraph().command(query).execute("demo");Thanks Damian!
Wow, it's a year old bug. Any plans on fixing it!?
--
---
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/gtf6FbAFhL4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to orient-databa...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.