Team,
Im new to hibernate can some help me out in applying analytical function to only children set in one to many relationship
Code:
@Entity
@Table(name = "CIO_HUMANRESOURCES")
public class CIOHumanResources implements Serializable {
private static final long serialVersionUID = 1L;
@EmbeddedId
private CIOHumanResourcesPK pk;
@Column(name = "SCENARIO")
private String scenario;
@Column(name = "CREATOR_USER_ID", updatable = false, insertable = true)
private String creatorUserID;
@Column(name = "MODIFIER_USER_ID")
private String modifierUserID;
@Column(name = "CREATED_DATE", updatable = false, insertable = true)
private Timestamp createdDate;
@Column(name = "MODIFIED_DATE", updatable = true, insertable = true)
private Timestamp modifiedDate;
@OneToMany(mappedBy = "resources", fetch = FetchType.EAGER)
@Fetch(FetchMode.SUBSELECT)
@BatchSize(size = 200)
private Set<CIOHumanResourcesApps> hrApps;
.....
}
Child
@Entity
@Table(name = "CIO_HUMANRESOURCES_APPS")
public class CIOHumanResourcesApps implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "APP_ID")
private String id;
@Column(name = "APP_TYPE")
private String appType;
@Column(name = "SVP_NAME")
private String svp;
@Column(name = "APP_VALUE")
private String appValue;
@ManyToOne
@JoinColumns({ @JoinColumn(name = "MONTH", nullable = false),
@JoinColumn(name = "QUARTER", nullable = false),
@JoinColumn(name = "YEAR", nullable = false) })
private CIOHumanResources resources;
....
}
}
Is there any way to apply analyatical function to child class, so that i can get childs in pirticular order.