Last active
April 19, 2017 05:16
-
-
Save thjanssen/355d678c0bda291de2fe390401b6de0d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TypedQuery<Book> q = em.createQuery("SELECT b FROM Book b " | |
+ "WHERE :double2 > function('calculate', b.price, :double1)" | |
, Book.class); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
07:15:43,305 DEBUG [org.hibernate.SQL] - | |
select | |
book0_.id as id1_0_, | |
book0_.price as price2_0_, | |
book0_.publishingDate as publishi3_0_, | |
book0_.title as title4_0_, | |
book0_.version as version5_0_ | |
from | |
Book book0_ | |
where | |
?>calculate(book0_.price, ?) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Query q = em.createQuery(“SELECT a, size(a.books) FROM Author a GROUP BY a.id”); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14:45:45,952 DEBUG [org.hibernate.SQL] - | |
select | |
author0_.id as col_0_0_, | |
count(books1_.authorId) as col_1_0_, | |
author0_.id as id1_0_, | |
author0_.firstName as firstNam2_0_, | |
author0_.lastName as lastName3_0_, | |
author0_.version as version4_0_ | |
from | |
Author author0_ cross | |
join | |
BookAuthor books1_ | |
where | |
author0_.id=books1_.authorId | |
group by | |
author0_.id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment