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

Cypher distinct aggregation returns null when query is started form a Neo4j::Rails::Model #288

Closed
dre-hh opened this issue Nov 29, 2013 · 1 comment

Comments

@dre-hh
Copy link

dre-hh commented Nov 29, 2013

(Beer.all.query {|n| n.as(:beer)[:style].distinct}).to_a
=> [nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil]

But

Neo4j._query (Beer.all.query {|n| n.as(:beer)[:style].distinct}).to_s

=> [{:"(beer.style)"=>"Lager"},
 {:"(beer.style)"=>"Abteibier"},
 {:"(beer.style)"=>"India Pale Ale (IPA)"},
 {:"(beer.style)"=>"Porter"},
 {:"(beer.style)"=>"Wit Bier"},
 {:"(beer.style)"=>"Belgisches Kirschbier"},
 {:"(beer.style)"=>"Rauchbier Märzen"},
 {:"(beer.style)"=>"Belgisches Trappistenbier"},
 {:"(beer.style)"=>"Red Ale"},
 {:"(beer.style)"=>"Californian Pale Ale"},
 {:"(beer.style)"=>"Weizen-Eisbock"},
 {:"(beer.style)"=>"Kellerbier"},
 {:"(beer.style)"=>"Ale"},
 {:"(beer.style)"=>"Weizenbock"},
 {:"(beer.style)"=>"American Amber Lager"},
 {:"(beer.style)"=>"Pale Ale"},
 {:"(beer.style)"=>"Weizendoppelbock"}]
#Gemfile
gem 'neo4j-community', "~> 1.9.5"
gem 'neo4j', github: 'andreasronge/neo4j', branch: 'rails4'
@andreasronge
Copy link
Member

Closed it because it is very old issue.

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

No branches or pull requests

2 participants