mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
FIX: insert in batch OneToOne relationship (#1609)
This commit is contained in:
committed by
Rob Bygrave
parent
2e0690efa9
commit
bac53a5d75
@@ -0,0 +1,34 @@
|
||||
package org.tests.batchinsert.o2o;
|
||||
|
||||
import java.util.UUID;
|
||||
import javax.persistence.CascadeType;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.OneToOne;
|
||||
|
||||
@Entity
|
||||
public class MeterSpecialNeedsClient {
|
||||
@Id
|
||||
private UUID id;
|
||||
|
||||
private String name;
|
||||
|
||||
@OneToOne(cascade = CascadeType.ALL)
|
||||
private MeterSpecialNeedsContact primary;
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public MeterSpecialNeedsContact getPrimary() {
|
||||
return primary;
|
||||
}
|
||||
|
||||
public void setPrimary(MeterSpecialNeedsContact primary) {
|
||||
this.primary = primary;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user