ClassCastException after applying PathProperties

I'm trying to apply some PathProperties

to mine Finders

, but I keep getting this error:

[ClassCastException: java.util.ArrayList could not be added to com.avaje.ebean.bean.BeanCollection]

This only happens when I have a List<...>

callable in mine PathProperties

like so:

PathProperties pathProperties = PathProperties.parse("(*,historique(*))");
List<Devi> test = Devi.find.apply(pathProperties).findList();

      

Where mine Finder

is defined like this:

public static Finder<String,Devi> find = new Finder<String,Devi>(Devi.class);

      

Here, the object is Devi

populated with public variables that I can call without any problem (PathProperties works "(*)"

), but when I try to access the list of objects inside that object (here, public List<Histo> historique

) it doesn't work. I tried and I can also access the object inside the object if it is not a list.

I'm a little lost here, I don't know what I did wrong.

+3


source to share


1 answer


According to https://github.com/ebean-orm/ebean/issues/591 , this is a bug caused by ArrayList initialization. Without initialization, it seems to work.



0


source







All Articles