mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#816 - Error saving circular relationships (when generated Id values)
This commit is contained in:
@@ -26,10 +26,6 @@ public class Booking {
|
||||
@Version
|
||||
private int version;
|
||||
|
||||
public Booking(Long bookingUid) {
|
||||
this.bookingUid = bookingUid;
|
||||
}
|
||||
|
||||
@OneToOne(cascade = CascadeType.ALL)
|
||||
@JoinColumn(name = "agent_invoice")
|
||||
private Invoice agentInvoice;
|
||||
@@ -40,7 +36,11 @@ public class Booking {
|
||||
|
||||
@OneToMany(mappedBy = "booking")
|
||||
private List<Invoice> invoices;
|
||||
|
||||
|
||||
public Booking(Long bookingUid) {
|
||||
this.bookingUid = bookingUid;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@@ -12,7 +12,6 @@ public class TestOne2OneBookingInvoice extends BaseTestCase {
|
||||
public void test() {
|
||||
|
||||
Booking b = new Booking(3000L);
|
||||
Ebean.save(b);
|
||||
|
||||
Invoice ai = new Invoice();
|
||||
Invoice ci = new Invoice();
|
||||
|
||||
Reference in New Issue
Block a user