我有3个实体。
Member:
mem_id;
mem_name;
@OneToOne
Address address;// ???!?!?
....
Customer:
cust_id // PK
mem_id // FK to member.member_id
type; //needed field
....
Addr
cust_id // FK to customer.cust_id.
@ManyToOne(fetch = FetchType.LAZY)
Customer customer;
....
我需要两件事:
type
值应如何映射这些实体?策略是什么?