Cool stuff. Maybe you also like this library called JINQ which tries to achieve something similar. I personally create a library called Blaze-Persistence that allows writing queries in a fluent fashion as well, although not compile time type safe yet. It provides some of the more advanced SQL features though on top of the JPA model like CTEs, recursive CTEs, subqueries in the FROM clause, set operation(UNION, INTERSECT, EXCEPT) support and much more.