Skip to content

Query placeholders in keys no longer correctly substituted [DATAMONGO-1072] #1992

@spring-projects-issues

Description

@spring-projects-issues

Jen Wilson opened DATAMONGO-1072 and commented

Between 1.5.1.RELEASE and 1.5.2.RELEASE, processing of query parameters for keys was broken. Example, this query:

@Query("{?0 : ?1}")
List<T> findAllByKeyValue(String key, String value);

When called with these parameters:

findAllByKeyValue("name", "Joe");

becomes this with 1.5.1: \{"name" : "Joe"\}

But with 1.5.2, the ?0 is not correctly substituted so this is the broken query that is created: \{"?0" : "Joe"\}


Affects: 1.5.2 (Dijkstra SR2), 1.6 GA (Evans), 1.7 M1 (Fowler)

Issue Links:

  • DATAMONGO-420 Extra quotes being added to @Query values and fields

Referenced from: pull request #233

Backported to: 1.6.1 (Evans SR1), 1.5.5 (Dijkstra SR5)

Metadata

Metadata

Labels

in: mappingMapping and conversion infrastructuretype: bugA general bug

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions