I have two classes, they are parent/children relationship.
When I want to build list of parent, the findAll method of parent and children is invoked. This will reduce performance significantly. Can anyone give a hint?
BTW, I am using spring roo 1.4.
@RooJavaBean
@RooToString
@RooEntity
public class TrainingProgram {
private String name;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "trainingProgram")
private Set<Course> courses = new HashSet<Course>();
}
@RooJavaBean
@RooToString
@RooEntity(finders = { "findCoursesByNameLike"})
public class Course {
@NotNull
@Column(name = "course_name")
@Size(min = 1, max = 60)
private String name;
@NotNull
@Size(max = 1000)
private String description;
@NotNull
@Column(name = "max_capacity")
@Min(1L)
@Max(9999L)
private Integer maxiumumCapacity;
@NotNull
@Enumerated(EnumType.STRING)
private CourseTypeEnum courseType;
@ManyToOne
private TrainingProgram trainingProgram;
.................


Reply With Quote
