Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REST API > POST COMMAND > COMMAND TEXT > FETCHPLAN in SELECT command not working #8700

Closed
octal-laurence opened this issue Dec 13, 2018 · 2 comments
Assignees

Comments

@octal-laurence
Copy link

octal-laurence commented Dec 13, 2018

OrientDB Version:

Java Version:

OS:

Expected behavior

the field applicant should expand as I use fetching strategies

Actual behavior

"result": [
{
"applicant": [
"#14:171"
],
"address": [
"#13:167"
],
"machineId": "DDDDD",
"dateCreated": "2018-12-13 12:02:12",
"purpose": ".",
"in_certificationApplicants": [
"#15:155"
],
"station": "DDDDD",
"stationName": "DDDDD",
"remarks": "",
"dateUpdated": "2018-12-13 12:02:12",
"status": "OPEN",
"@Rid": "#12:174",
"@Version": 1,
"@Class": "policeClearanceCertifications"
}
],

Steps to reproduce

My code is

return rp.post('http://localhost/command/database/sql', {
command: SELECT IN('${this._edgePoliceClearanceCertifications.tbl}') as applicant, IN('${this._edgePoliceClearanceCertifications.tbl}').IN('${this._edgeApplicantsAddress.tbl}') as address, * FROM ${rid} fetchplan *:1
});

@luigidellaquila
Copy link
Member

Hi @octal-laurence

Which version are you using? If it's v 3.0, I strongly suggest you to use nested projections instead https://orientdb.com/docs/3.0.x/sql/SQL-Projections.html#nested-projections (fetch plans are deprecated)

Thanks

Luigi

@luigidellaquila luigidellaquila self-assigned this Dec 17, 2018
@octal-laurence
Copy link
Author

octal-laurence commented Dec 17, 2018

Hi @octal-laurence

Which version are you using? If it's v 3.0, I strongly suggest you to use nested projections instead https://orientdb.com/docs/3.0.x/sql/SQL-Projections.html#nested-projections (fetch plans are deprecated)

Thanks

Luigi

I'd check on it just now.

Hi, thanks for the assistance, May I ask is this solution can be use also in querying the edges? like in my given example query.

also I used some other methods too, like IN("edges query").toJson() seems fine, just checking if those are accurate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants