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

add * support for .include() method. #4828

Closed
martingg88 opened this issue Aug 20, 2015 · 13 comments
Closed

add * support for .include() method. #4828

martingg88 opened this issue Aug 20, 2015 · 13 comments
Assignees
Milestone

Comments

@martingg88
Copy link

does .include support for * in order to include all the fields from multiple crossing vertexes?

@nagarajasr
Copy link
Contributor

sorry it is not clear what exactly you are looking for, if you want to include all fields, don't use .include() method

@mattaylor
Copy link
Contributor

Then how do you suggest including a fully expanded a reference to another doc aa part of a projection of the parent? Fetchplan?

@nagarajasr
Copy link
Contributor

perhaps you need to use fetchPlan? have you already tried that and does it not meet your requirement?

@martingg88
Copy link
Author

what is the simple and quick way to include all fields for following query? It's quite irritating to specify each field in 'include' method at sometime.

select $creator[0].include(*) as creator from property
let $creator = (SELECT expand(in('own')[@Class='user']) from $current) )
,$place=(SELECT expand(out('locate')[@Class='place']) from $current)
where $place.country[0].toLowerCase() = 'gb'

@nagarajasr
Copy link
Contributor

need more info on your schema and your actual requirement to help you. also in your query $place is not defined?

@martingg88
Copy link
Author

I just updated the query. can you take a look. I just wana include all fields from property, creator and place into one row for each property record. any idea how to make "include" to cater for * that will automatically include all fields of each class instead of i manually specify field i want to include.

@nagarajasr
Copy link
Contributor

does this work for you?

select expand(all) from (select @rid, unionall(@rid, $creator[0],$place[0]) as all from property 
    let $creator=in('own')[@class='user'], $place=out('locate')[@class='place'] ) unwind all

@martingg88
Copy link
Author

Sorry. your query doesn't work for me. thanks for your effort.

what I expect the return result should be as follows:

  1. @Rid @Class name creator place

    Add trigger feature [moved] #3:1 property shop "user object/array include all user's fields" "place object/array include all place's fields"

@martingg88
Copy link
Author

that is weird lolx as if it only return @Rid instead all the fields i expected to return.

include("@Rid", "first_name","last_name")

@red-0ne
Copy link

red-0ne commented Aug 23, 2015

@martingg88, is it related to #3630 ?

@martingg88
Copy link
Author

yes. hope they can solve this issue soon.

@lvca lvca closed this as completed Aug 3, 2017
@lvca
Copy link
Member

lvca commented Aug 3, 2017

include/exclude already take wildcards

@lvca lvca added this to the 2.2.10 milestone Aug 3, 2017
@lvca lvca self-assigned this Aug 3, 2017
@cegprakash
Copy link

cegprakash commented Oct 1, 2018

I tried
select first_name, out('has_property').include(*) from User where id = '6143545896216109'

It doesn't include any field from the target vertex
Voting to reopen

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

No branches or pull requests

6 participants