More complex example using Java Persistence API.