I would expect both to return a collection of vertices, to be manipulated 
identically.

If I have vertices N1 and N2 where N2 is a child of N1
why does 
select from N1
give its result in a different form then 
select out() from N1?

I would expect them to be the same.
As the example shows they are not.

Is this a bug, or can I manipulate the result of out() so that is is the 
same as select from V?


example

```SQL
create database memory:X admin admin memory
create class N1 extends V
create class N2 extends V
create class N1N2 extends E
create vertex N1 set name = 'N1A'
create vertex N2 set name = 'N2A'
create vertex N2 set name = 'N2B'
create edge from 11:0 to 12:0
create edge from 11:0 to 12:1

--verify N2
select from N2
-- 0   |#12:0|N2A |#11:0|null   
-- 1   |#12:1|N2B |null |#11:0  
-- ok
 
-- verify name in N2
select name from N2
--0   |#-2:1|N2A
--0   |#-2:1|N2B
--- ok

-- verify to edges from N1 to N2
select out() from N1
0   |#-2:1|[2]
--ok
--- BUT why is this not the same as  select from N2

-- so this does not work as expected either
-- 2nd issue parser seem to ignore tokens it does not understand instead of 
throwing an error
select out().name from N1
--0   |#-2:1|[1]

-- I get some joy referencing the collection
select out()[0].name from N1
--0   |#-2:1|N2A

1 item(s) found. Query executed in 0.001 sec(s).
orientdb {X}> select expand(out()) from N1

------+-----+----+-----
--#   |@RID |name|in_
------+-----+----+-----
--0   |#12:0|N2A |#11:0
--1   |#12:1|N2B |#11:0
------+-----+----+-----


-- again this is not right, name is returned here incidentally, exact same 
result as previous query
2 item(s) found. Query executed in 0.002 sec(s).
orientdb {X}> select expand(out()).name from N1

------+-----+----+-----
--#   |@RID |name|in_
------+-----+----+-----
--0   |#12:0|N2A |#11:0
--1   |#12:1|N2B |#11:0
------+-----+----+-----
```

-- 

--- 
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.

Reply via email to