orientechnologies / orientjs

The official fast, lightweight node.js client for OrientDB
http://orientdb.com
Other
326 stars 68 forks source link

Fetch plan for link type #366

Closed nomi-ramzan closed 5 years ago

nomi-ramzan commented 5 years ago

Hi I am using version 3.0.17 schema:

{
  prop1: string
  link1:  link -> schema2.@rid
}

Query:

SELECT * FROM schema FETCHPLAN *:1 LIMIT -1
// OR
db.select().from('schema').fetch({ '*': 2 })

it is still not expanding any linked record. Can you please correct my query. Thank you

wolf4ood commented 5 years ago

Hi @nomi-ramzan

are you using the new APIs with 3.0.x of OrientJS?

nomi-ramzan commented 5 years ago

Yes I am using all latest versions orientdb( 3.0.17 ) orientjs ( 3.0.4 )

wolf4ood commented 5 years ago

Are you using the API with client and sessions described here right?

https://orientdb.com/docs/3.0.x/orientjs/OrientJS.html

nomi-ramzan commented 5 years ago

Ye I am sure. and following this example OrientDB: 3.0.17 Orientjs: 3.0.4 Node: v8.12.0

wolf4ood commented 5 years ago

Ok, because fetch plan with the new APIs are deprecated. You should use nested projection

for fetching linked objects

https://orientdb.com/docs/3.0.x/sql/SQL-Projections.html

nomi-ramzan commented 5 years ago

OK Thank you. Let me check that.

wolf4ood commented 5 years ago

Hi @nomi-ramzan

was the link helpful ? can we close this issue?

Thanks

wolf4ood commented 5 years ago

Hi @nomi-ramzan

Let me know if you need other info. Meanwhile i'm closing this

Thanks