More complex example of using JPA.