mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#527 - @OrderBy on child-of-child property
This commit is contained in:
@@ -1,51 +1,51 @@
|
||||
package com.avaje.tests.model.basic;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.persistence.DiscriminatorValue;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Inheritance;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.OrderBy;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
@Entity
|
||||
@Inheritance
|
||||
@DiscriminatorValue("C")
|
||||
public class Car extends Vehicle {
|
||||
|
||||
private static final long serialVersionUID = 4716705779684333446L;
|
||||
private static final long serialVersionUID = 4716705779684333446L;
|
||||
|
||||
private String driver;
|
||||
private String driver;
|
||||
|
||||
|
||||
@ManyToOne
|
||||
TruckRef carRef;
|
||||
|
||||
@OneToMany(mappedBy="car")
|
||||
private Set<CarAccessory> accessories = new HashSet<CarAccessory>();
|
||||
|
||||
public String getDriver() {
|
||||
return driver;
|
||||
}
|
||||
@ManyToOne
|
||||
TruckRef carRef;
|
||||
|
||||
public void setDriver(String driver) {
|
||||
this.driver = driver;
|
||||
}
|
||||
@OneToMany(mappedBy = "car")
|
||||
@OrderBy("fuse.locationCode")
|
||||
private Set<CarAccessory> accessories = new HashSet<CarAccessory>();
|
||||
|
||||
public TruckRef getCarRef() {
|
||||
return carRef;
|
||||
}
|
||||
public String getDriver() {
|
||||
return driver;
|
||||
}
|
||||
|
||||
public void setCarRef(TruckRef carRef) {
|
||||
this.carRef = carRef;
|
||||
}
|
||||
public void setDriver(String driver) {
|
||||
this.driver = driver;
|
||||
}
|
||||
|
||||
public Set<CarAccessory> getAccessories() {
|
||||
return accessories;
|
||||
}
|
||||
public TruckRef getCarRef() {
|
||||
return carRef;
|
||||
}
|
||||
|
||||
public void setAccessories(Set<CarAccessory> accessories) {
|
||||
this.accessories = accessories;
|
||||
}
|
||||
public void setCarRef(TruckRef carRef) {
|
||||
this.carRef = carRef;
|
||||
}
|
||||
|
||||
public Set<CarAccessory> getAccessories() {
|
||||
return accessories;
|
||||
}
|
||||
|
||||
public void setAccessories(Set<CarAccessory> accessories) {
|
||||
this.accessories = accessories;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user