РН

@Entity
@Table(name = "product")
public class Product {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
private String name;
private Component component;
}
@Entity
@Table(name = "component")
public class Component {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
private String name;
}
На картинке пример интерфейса: