mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-11 01:36:07 +00:00
Add testcase for wrong batch sorting
This commit is contained in:
1 parent
385cc76e34
commit
9067508e1d
4 files changed
+216
No files matched your search
@@ -0,0 +1,31 @@
|
||||
package org.tests.model.site;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import java.util.UUID;
|
||||
|
||||
@Entity
|
||||
public class DataContainer {
|
||||
|
||||
@Id
|
||||
private UUID id;
|
||||
|
||||
private String content;
|
||||
|
||||
public UUID getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(final UUID id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(final String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
package org.tests.model.site;
|
||||
|
||||
import javax.persistence.CascadeType;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.OneToOne;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
@Entity
|
||||
public class Site {
|
||||
|
||||
@Id
|
||||
private UUID id;
|
||||
|
||||
private String name;
|
||||
|
||||
@OneToMany(cascade = CascadeType.ALL, mappedBy = "parent")
|
||||
private List<Site> children = new ArrayList<>();
|
||||
|
||||
@ManyToOne(cascade = {})
|
||||
private Site parent;
|
||||
|
||||
@OneToOne(cascade = CascadeType.ALL)
|
||||
private DataContainer dataContainer;
|
||||
|
||||
@OneToOne(cascade = CascadeType.ALL)
|
||||
private SiteAddress siteAddress;
|
||||
|
||||
public UUID getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(final UUID id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public List<Site> getChildren() {
|
||||
return children;
|
||||
}
|
||||
|
||||
public void setChildren(final List<Site> children) {
|
||||
this.children = children;
|
||||
}
|
||||
|
||||
public Site getParent() {
|
||||
return parent;
|
||||
}
|
||||
|
||||
public void setParent(final Site parent) {
|
||||
this.parent = parent;
|
||||
}
|
||||
|
||||
public SiteAddress getSiteAddress() {
|
||||
return siteAddress;
|
||||
}
|
||||
|
||||
public void setSiteAddress(final SiteAddress siteAddress) {
|
||||
this.siteAddress = siteAddress;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(final String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public DataContainer getDataContainer() {
|
||||
return dataContainer;
|
||||
}
|
||||
|
||||
public void setDataContainer(final DataContainer dataContainer) {
|
||||
this.dataContainer = dataContainer;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package org.tests.model.site;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import java.util.UUID;
|
||||
|
||||
@Entity
|
||||
public class SiteAddress {
|
||||
|
||||
@Id
|
||||
private UUID id;
|
||||
|
||||
private String street;
|
||||
|
||||
private String city;
|
||||
|
||||
private String zipCode;
|
||||
|
||||
public String getStreet() {
|
||||
return street;
|
||||
}
|
||||
|
||||
public void setStreet(final String street) {
|
||||
this.street = street;
|
||||
}
|
||||
|
||||
public String getCity() {
|
||||
return city;
|
||||
}
|
||||
|
||||
public void setCity(final String city) {
|
||||
this.city = city;
|
||||
}
|
||||
|
||||
public String getZipCode() {
|
||||
return zipCode;
|
||||
}
|
||||
|
||||
public void setZipCode(final String zipCode) {
|
||||
this.zipCode = zipCode;
|
||||
}
|
||||
|
||||
public UUID getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(final UUID id) {
|
||||
this.id = id;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user