Sorted out JPA relationships.