Join example for JPA finder

Posted by Jens J├Ąger on December 31, 2013

The JPA finder for play 2 works with joins as well.

Imagine you have a Task model with a creator:

referenced to a User model with a name:

You can write a method to get all Task for a creator username by joining on creator and access the user fields with the creator.field syntax:

The source code for this example with unit tests is pushed to Play4Jpa

Trackbacks

Use this link to trackback from your own site.

Comments

Leave a response

Comments

Information about Data protection