Heys guys, i have a Problem using Play Framework. I am trying to display a large amount of Data (from this Database). When i am using the "find.all()" the Play Framework Server crashes, since it takes to much memory.
I got a DB Model named:
@Entity
public class dblp_pub_new extends Model {
[...]
public dblp_pub_new() {}
public static List<dblp_pub_new> all() {
return find.all();
}
public String getDoi() {
return doi;
}
public void setMdate() {
this.mdate = new Date();
}
public static Finder<String,dblp_pub_new> find = new Finder<String, dblp_pub_new>(String.class, dblp_pub_new.class);
}
My rendering function is, which is contained in Application.java:
public static Result dois(){
return ok(views.html.index.render(dblp_pub_new.all(), DoiForm));
}
I am trying to limit the all() Query to 50 (best would be per page). But i cant seem to figure it out. I think i need a List returned to display it on the webpage. But I can't get it to work. I would be really relieved if one of you guys (and girls) could help me figuring out this problem. I've tried it with "fetch" and "setMaxRows()" but I only get errors i can't seem to solve. If there is something unclear, please just ask and i will try to provide as much information as i can. Thank you.