learning Rails and JPA