Hi group,

I have a document type/class TYPE_A, which has a property parent_id. It 
also has a vertex to the parent item, also of TYPE_A. The vertex is of the 
type RELATIONSHIP_parent.

The following query works as expected:

SELECT COUNT(*) FROM TYPE_A WHERE parent_id = '366205'
// returns count of 16

But the following queries don't:

SELECT COUNT(*) FROM TYPE_A WHERE RELATIONSHIP_parent._id = '366205'
// returns count of 0 // unexpected!

SELECT COUNT(*) FROM TYPE_A WHERE RELATIONSHIP_parent CONTAINS (_id = 
'366205')
// just an attempt to do the same thing
// returns count of 0 // unexpected!

However, this parent item *does* in fact exist:

SELECT COUNT(*) FROM TYPE_A WHERE _id = '366205'
// returns count of 1 // look, mom, it really exists!

I must be getting something wrong in terms of the query syntax.

I'm trying to move from the WHERE parent_id style to the WHERE 
RELATIONSHIP_parent._id to see the performance difference.

This is OrientDB 2.0.

Your help much appreciated.


Sander.

-- 

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