I'm learning Spring Data JPA and having some trouble establishing the relationship between these two tables:
- product table with columns id, name, product_type_id
- product_type table with columns id, name
A product can have only one type. A type can be associated with many products.
Where would I use the @OnetoMany and @ManytoOne annotations in my entity classes?