Announcement Announcement Module
Collapse
No announcement yet.
Neo4J: Query parameters conversion not working Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Neo4J: Query parameters conversion not working

    Hi,

    I dunno if this is a bug, or it is intended to be so, but when I pass some parameter into query method that has custom class-to-String conversion registered, the query method does not convert the value to String.

    Concretely, I use:
    Code:
    neo4jTemplate.query(cypherQueryString, queryParametersMap)
    And I have Joda DateTime-to-String converters registered through ConversionService. Mapping to entity fields works fine with these converters (unfortunately not to Long values, only String, but I already registered that bug).

    Anyway, when I put something like this inside my query parameters map:
    Code:
    queryParametersMap.put("time", new DateTime());
    the query return no result, which is not correct.
    But when I call conversion manually, like:
    Code:
    queryParametersMap.put("time", neo4jTemplate.convert(new DateTime(), String.class));
    then the query returns the result.

    It's as if query method ignores the registered custom conversion for query parameters.

    Is this a bug?

    -Vjeran
    Last edited by vmarcinko; May 28th, 2012, 04:31 AM.

  • #2
    It is difficult to determine for parameters which property/type they refer to, so in principle the only thing we can do is to look for spring converters.

    Can you raise a JIRA issue for this?

    Thanks a lot

    Michael

    Comment

    Working...
    X