Finder cannot resolve setBufferFetchSizeHint( int) & setDistinct(Boolean)


(Saloua ) #1

I have play-java 2.4 and I had defined a Finder :

“public static final Finder<Long, ComEntity> finder = new Finder<>(ComEntity.class);”

But there is two method that not works with it…(setBufferFetchSizeHint( int) & setDistinct(Boolean))

[ msg: “Cannot resolve method setDistinct(boolean)…”)

I use ORM Ebean

What is the problem please ?


(Marcos Pereira) #2

Hey @Salune,

Better if you share the code where it was not possible to resolve such methods.


(Saloua ) #3

This is my code;

import com.avaje.ebean.Model;

public static final Model.Finder<Long, ComEntity> select = new Finder<>(ComEntity.class);

public static List<ComEntity> getByFunction(String functionName){
return select.setDistinct(true).where().eq(“intervenant.IntFnId.FunctionName”, functionName).findList();
}