neo4jrb / activegraph

An active model wrapper for the Neo4j Graph Database for Ruby.
http://neo4jrb.io
MIT License
1.4k stars 276 forks source link

Query with date conditions return nothing #1542

Closed asnad closed 4 years ago

asnad commented 5 years ago

Date conditions are not working:

Code example (inline, gist, or repo)

Distance.all(:d).where("d.created_at <= {the_date}").params(the_date: DateTime.now) it returns nothing while I have records for this condition.

Runtime information:

Neo4j database version: 3.5.3 neo4j gem version: 9.4.0 neo4j-core gem version: N/A

OpenCoderX commented 4 years ago

You have to convert to timestamp: DateTime.now.to_i