spring-projects / spring-data-neo4j

Provide support to increase developer productivity in Java when using Neo4j. Uses familiar Spring concepts such as a template classes for core API usage and lightweight repository style data access.
http://spring.io/projects/spring-data-neo4j
Apache License 2.0
828 stars 620 forks source link

@QueryResult doesn't work property with property names different from AS attribute in the query [DATAGRAPH-883] #1444

Closed spring-projects-issues closed 4 years ago

spring-projects-issues commented 8 years ago

Luanne Misquitta opened DATAGRAPH-883 and commented

With SDN 4.1.1 and 4.1.2 too, if I have a query result with

@QueryResult public class Result {

@Property(name = "user") private UserEntity mUser; private CarEntity mCar;

public void setUser(UserEntity pUser) { mUser = pUser; }

public void setCar(CarEntity pCar) { mCar = pCar; } } and a query like that

MATCH (u:User) <- [:drived_by] - (c:Car) WHERE id(u) = 3 and id(c) = 5 RETURN u as user, c as car

SDN can't map the result


Affects: 4.1.1 (Hopper SR1), 4.1.2 (Hopper SR2)

spring-projects-issues commented 4 years ago

Michael Simons commented

Works from at least 5.1 onwards. Code base includes tests