Skip to content

Instantly share code, notes, and snippets.

@timowest
Created November 5, 2012 10:05
Show Gist options
  • Save timowest/4016436 to your computer and use it in GitHub Desktop.
Save timowest/4016436 to your computer and use it in GitHub Desktop.
Querydsl Alias usage
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