-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Type error when retrieving a datetime value from database #486
Labels
bug
Something isn't working
Comments
This is definitely a bug in the type constraint definition, thanks a lot for the report, a fix is on its way! |
fbiville
pushed a commit
that referenced
this issue
May 16, 2023
Fixes #486 Signed-off-by: Florent Biville <florent.biville@neo4j.com>
No problem! Glad I could help. |
The fix is going to be released towards the end of the month, with v5.9.0 FYI. |
fbiville
pushed a commit
that referenced
this issue
May 17, 2023
Fixes #486 Signed-off-by: Florent Biville <florent.biville@neo4j.com>
@knotseaborg 5.9.0 is now out with this fix: https://github.com/neo4j/neo4j-go-driver/wiki/5.x-changelog#v590 |
Thanks for the update! |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
The following error was found while retrieving a datetime value from the database
panic: expected value to have type dbtype.Time but found type time.Time
Neo4j Version: 5.7.0 Community
Neo4j Mode: Single instance
Driver version: Go driver v5.8.1
Go version: go1.20.4 linux/amd64
Operating System: Linux Mint 21.1 Vera 64-bit
Steps to reproduce
create (n:Node{dateTimeLabel: datetime("2016-11-22T18:59:00.000+0900")});
As an alternative, when
neo4j.Time
is replaced withtime.Time
, it does not match the type specification and an error is returned.Expected behavior
Perhaps the node property
dateTimeLabel
should be of typedbtype.Time
to avoid returning the error?Actual behavior
Node property
dateTimeLabel
is of typetime.Time
Stacktrace
For
For
Quick dirty fix
added
time.Time
totype PropertyValue interface
in neo4j/graph.goThe text was updated successfully, but these errors were encountered: