-
Notifications
You must be signed in to change notification settings - Fork 876
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
JPA 2.1 capabilities #658
Comments
Which specific Hibernate 4.3 and JPA 2.1 features would you like to see supported? |
Thank you for your interest. At first, support |
@ldez What is the (full) list of JPA 2.1 features that could/should be supported? |
JPA 2.1 additions |
I updated the title to better reflect what has been done for it. |
Released in 3.3.4 |
Good work, sorry for not replying sooner but I had a lot of work. |
Sorry for asking in the closed issue, but Google search for "Querydsl JPA 2.1 FUNCTION" lead me here. I see that TREAT is in Querydsl, but I don't understand what the status of FUNCTION is, and if it is in, how it should be used (search through Reference did not help). |
Seems I needed to ask (after a long search, mind you :-)), after the question I got it in a minute, as it is not strictly tied to JPA 2.1, but more to Querydsl templates: So we should just use |
Yes, that would be right. |
JPA 2.1 introduced the TREAT operator for explicit casting. Initial support for TREAT in the FROM clause was added in PR #705. However, the specification also describes the notion of `treated_subpath` expressions (chapter 4.4.4.1) that are allowed in the WHERE clause of a query. The syntax is as follows: > ``` > treated_subpath ::= TREAT(general_subpath AS subtype) > > single_valued_path_expression ::= qualified_identification_variable | TREAT(qualified_identification_variable AS subtype) | state_field_path_expression | single_valued_object_path_expression > ``` And can be used as such: ```SQL SELECT e FROM Employee e JOIN e.projects p WHERE TREAT(p AS LargeProject).budget > 1000 ``` (Example from chapter 4.4.9). This pull request adds the support for treated subpaths in QueryDSL. It does so by introducing a new `PathType` and convenience method `JPAExpressions.treat`.
JPA 2.1 introduced the TREAT operator for explicit casting. Initial support for TREAT in the FROM clause was added in PR #705. However, the specification also describes the notion of `treated_subpath` expressions (chapter 4.4.4.1) that are allowed in the WHERE clause of a query. The syntax is as follows: > ``` > treated_subpath ::= TREAT(general_subpath AS subtype) > > single_valued_path_expression ::= qualified_identification_variable | TREAT(qualified_identification_variable AS subtype) | state_field_path_expression | single_valued_object_path_expression > ``` And can be used as such: ```SQL SELECT e FROM Employee e JOIN e.projects p WHERE TREAT(p AS LargeProject).budget > 1000 ``` (Example from chapter 4.4.9). This pull request adds the support for treated subpaths in QueryDSL. It does so by introducing a new `PathType` and convenience method `JPAExpressions.treat`.
JPA 2.1 introduced the TREAT operator for explicit casting. Initial support for TREAT in the FROM clause was added in PR #705. However, the specification also describes the notion of `treated_subpath` expressions (chapter 4.4.4.1) that are allowed in the WHERE clause of a query. The syntax is as follows: > ``` > treated_subpath ::= TREAT(general_subpath AS subtype) > > single_valued_path_expression ::= qualified_identification_variable | TREAT(qualified_identification_variable AS subtype) | state_field_path_expression | single_valued_object_path_expression > ``` And can be used as such: ```SQL SELECT e FROM Employee e JOIN e.projects p WHERE TREAT(p AS LargeProject).budget > 1000 ``` (Example from chapter 4.4.9). This pull request adds the support for treated subpaths in QueryDSL. It does so by introducing a new `PathType` and convenience method `JPAExpressions.treat`.
[#658] Support JPQL Treated paths for WHERE clause
Add support for Hibernate 4.3.x.
Add also support of new JPA 2.1 capabilities, ex :
treat
for.as(Class)
when entities are joined.The text was updated successfully, but these errors were encountered: