คำถามติดแท็ก mappedby

6
"ด้านผกผันของสมาคม" ใน JPA OneToMany / ManyToOne แบบสองทิศทางคืออะไร
ในส่วนตัวอย่างของการ@OneToManyอ้างอิงคำอธิบายประกอบ JPA : ตัวอย่าง 1-59 @OneToMany - ระดับลูกค้าพร้อม Generics @Entity public class Customer implements Serializable { ... @OneToMany(cascade=ALL, mappedBy="customer") public Set<Order> getOrders() { return orders; } ... } ตัวอย่าง 1-60 @ManyToOne - คลาสคำสั่งซื้อกับ Generics @Entity public class Order implements Serializable { ... @ManyToOne @JoinColumn(name="CUST_ID", nullable=false) public Customer getCustomer() { return …
โดยการใช้ไซต์ของเรา หมายความว่าคุณได้อ่านและทำความเข้าใจนโยบายคุกกี้และนโยบายความเป็นส่วนตัวของเราแล้ว
Licensed under cc by-sa 3.0 with attribution required.