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

Support for type(entity) in JPA #102

Closed
timowest opened this issue Feb 23, 2012 · 3 comments
Closed

Support for type(entity) in JPA #102

timowest opened this issue Feb 23, 2012 · 3 comments

Comments

@timowest
Copy link
Member

@timowest timowest commented Feb 23, 2012

Support for type(entity) in JPA

This can be utilized for example in sorting etc.

@timowest
Copy link
Member Author

@timowest timowest commented Feb 23, 2012

Add to JPQLGrammar

timowest added a commit that referenced this issue Feb 23, 2012
@timowest
Copy link
Member Author

@timowest timowest commented Feb 26, 2012

I added the following method to JPQLGrammar which can be used for ordering on type

public static StringExpression type(EntityPath<?> path) {
    return StringOperation.create(JPQLTemplates.TYPE, path);
}

It is String typed, because with the Class type a ComparableExpression could not be constructed, and because type(alias) is mapped to alias.class for Hibernate which is String typed.

@timowest
Copy link
Member Author

@timowest timowest commented Mar 11, 2012

released in 2.3.3

@timowest timowest closed this Mar 11, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant