DataManager loads only first record from DB view

Hello,

DataManager loads only the first record of three records when querying by parameter. The query to the DB view is as follows: “Select e from Country e where e.name = :name”.
When I query the database directly, it returns all three records.
Any suggestions where the problem could be?

Thanks,

Hello,

“where e.name = :name” - what is the value of :name parameter, and do all 3 records have same value for e.name ?

Kind regards,
Mladen

Hello Mladen,

The value of :name parameter is passed to the dataLoader from the controller and it is Long value. Yes, all 3 records have the same value. I am querying to fetch all 3 records to show them in table.

Thanks

Try to set logging.level.eclipselink.logging.sql = debug in application.properties and check what SQL is actually executed.

Hello Konstantin,

I have already checked the SQL query to the database, it is fine.

I found a workaround by replacing the Collection in my xml file with keyValueCollection and I am able now to load the table with all the records. If you have a better suggestion I would appreciate it.

I think it is something related to mapping the records from databese to Jmix entity…

Hi Nikolay,
I will be happy to suggest something if you provide a test project where the problem can be reproduced.