Possible bug in filters

Hi, i need to create simple filter filtering in related entity relation.
Entity A i am using is standard entity entity B is also standard entity but entity C is integer entity. And here comes the catch.

A to B is ONE_TO_MANY
B to C is MANY_TO_ONE

Check image:
A is actual entity. (standard entity)
B is “jazdy” entity (standard entity)
C is “dopravca” entity (integer entity)

This is setting
image

i get this exeption:

java.lang.IllegalArgumentException: You have attempted to set a value of type class java.lang.Integer for parameter filter_NalGSKWSMG85186 with expected type of class com.company.doprava.entity.DopravcoviaIn from query string select e from doprava_Doprava e join e.jazdy j where ((e.date_of_change >= :e_date_of_change_1_1 and e.date_of_change < :e_date_of_change_1_2) and e.stav = :filter_stav31279 and j.id is not null and j.dopravca like :filter_NalGSKWSMG85186) order by e.date_of_change desc, e.id desc.

Hi Igor,
What version of the CUBA platform are you using?
Could you reproduce the problem on a sample project and attach it here?

In screen A you have allready prepared filter filed just filter single item which is there.
Btw. increase max upload size if you want somebody to uploade here.

Thank you for reporting the problem. We have created an issue in our GitHub.

1 Like

Hi @igor.sovcik,
Please specify id column in a query, b.c.id = ? this will solve your problem.
Regards,
Mikhail

Allready noticed change in github bug. Thank you for solution. You´re great.

2 Likes