Nested query with spring data jpa and eclipselink -
i working spring ,spring data jpa ,and eclipselink using repository define queries , have nested query , working in mysql directly not in repository
@query("select don donnee don don.rownumber in " + "(select distinct(do.rownumber) donnee do" + " char_length(do.valeur) > 14 , substring(do.valeur, 7, 4) = ?1 )" ) public list<donnee> donnespardate(string date);
i error : [101, 164] expression not valid conditional expression.
any please
try entity manager
string query = "select don donnee don don.rownumber in " + "(select distinct(do.rownumber) donnee do" + " char_length(do.valeur) > 14 , substring(do.valeur, 7, 4) = ?1 )"; entitymanager em = this.emf.createentitymanager();
query result = em.createquery(query); list results = result.getresultlist();
and autowire entitymanager : @autowired private entitymanagerfactory emf;
Comments
Post a Comment