Created
November 5, 2012 10:05
-
-
Save timowest/4016436 to your computer and use it in GitHub Desktop.
Querydsl Alias usage
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
Person p = alias(Person.class); | |
List<Person> persons = query.from($(p)) | |
.where($(p.getName()).eq("Jason").and( | |
$(p.getAge()).gt(10)).and( | |
$(p.getCountry()).like("Canad*")).or( | |
$(p.getName()).eq("Dhanji").and( | |
$(p.getCountry()).ne("Canada")))) | |
.list($(p)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment