Skip to content
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

Error on yearMonth function #827

Closed
daniel-frank opened this issue Jun 24, 2014 · 2 comments
Closed

Error on yearMonth function #827

daniel-frank opened this issue Jun 24, 2014 · 2 comments
Labels
Milestone

Comments

@daniel-frank
Copy link

I'm trying to update QueryDSL from 3.2.1 to 3.4.0, but a query with yearMonth function is raising an exception on Eclipselink (The right expression is not a valid expression).
Looking at the generated JPQL I notice the following differences:

3.2.1

select 1
from Log log
where log.tableName = ?1 and log.operation = ?2 and extract(year from log.date) * ?3 + extract(month from log.date) = ?4

3.4.0

select 1
from Log log
where log.tableName = ?1 and log.operation = ?2 and year(log.date) * 100 + month(log.date) = ?3

I'm using Eclipselink 2.5.1 (with JPA 2.1 support).

@timowest
Copy link
Member

In refactorings the correct mapping for yearMonth was not preserved. This has now been fixed in the pull request.

@timowest timowest modified the milestone: 3.4.1 Jun 24, 2014
@timowest
Copy link
Member

Released in 3.4.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants