Skip to content

Hibernate Error after upgrading from 2.1.6 to 2.1.7 #17961

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
syamsu-smansa opened this issue Aug 26, 2019 · 4 comments
Closed

Hibernate Error after upgrading from 2.1.6 to 2.1.7 #17961

syamsu-smansa opened this issue Aug 26, 2019 · 4 comments
Labels
for: external-project For an external project and not something we can fix

Comments

@syamsu-smansa
Copy link

syamsu-smansa commented Aug 26, 2019

After upgrading spring boot to 2.1.7 from 2.1.6, running application are failing due to the issue:

Caused by: org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: count near line 1, column 8 [select count(new map(model as levelTingkat)) from com.jasamedika.medifirst2000.entity.LevelTingkat model left join model.id id  where id.kdProfile=:kdProfile  and model.statusEnabled=true  ]
public interface  interface LevelTingkatDao extends CrudRepository.
Query : "select new map(model as levelTingkat) " 
            + " from LevelTingkat model left join model.id id "
            + " where id.kdProfile=:kdProfile "
            + " and model.statusEnabled=true  "
method: Page<Map<String, Object>> findAllList(
            @Param("kdProfile") Integer kdProfile,
            Pageable pageable);

In new CrudRepository, it seem, has adding "count" to Query HQL, because present of Pageable parameter.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Aug 26, 2019
@philwebb
Copy link
Member

This looks related to either a Spring Data JPA or Hibernate upgrade. I've opened https://jira.spring.io/browse/DATAJPA-1598 to see if the Spring Data team can help. Can you please attach your full LevelTingkatDao file to that issue. It's not currently clear if you're relying on the query generated by the method name findAllList or if you're using @Query.

@philwebb philwebb added for: external-project For an external project and not something we can fix and removed status: waiting-for-triage An issue we've not yet triaged labels Aug 26, 2019
@syamsu-smansa

This comment has been minimized.

@snicoll

This comment has been minimized.

@wilkinsona

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: external-project For an external project and not something we can fix
Projects
None yet
Development

No branches or pull requests

5 participants