Uploaded image for project: 'Hibernate OGM'
  1. OGM-1255

Parameter in LIKE clause not working for Neo4j

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 5.4-next
    • Component/s: neo4j, query
    • Labels:
      None
    • Bug Testcase Reminder (view):

      Bug reports should generally be accompanied by a test case!

    • Last commented by a user?:
      true
    • Sprint:

      Description

      Example (You can add this test in SimpleQueriesTest:

      	@Test
      	public void testParametricLikeQueries() throws Exception {
      		List<?> result = session
      				.createQuery( "from Hypothesis h where h.description LIKE :myParam" )
      				.setString( "myParam", "%stuff%" )
      				.list();
      		assertThat( result ).onProperty( "id" ).containsOnly( "16" );
      	}
      

      This is because Neo4jQueryRendererDelegate#predicateLike doesn't check if the prameterValue is a query parameter.

        Attachments

          Issue links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: