Grid not showing data

I’m seeing some strange issue. I created spring projection and attached it to the Grid grid = new Grid<>(AceEventsEntityInfo.class,false);. When I execute the query I see data but the grid is showing as blank. As you see in the video, when I scroll down it is showing the query executed in the console but grid is empty. No data is shown. But if I use the entity directly in the grid, I’m able to see the data. What could be the issue here ?

Only thing that comes to mind would be duplicate hash code / equals

duplicate hash code / equals in the entity ?

when I use the entity it is working. Only when I use the projection it is not. Does this mean, the projection is not passing the hash code / equals to the grid ? If so, how do I pass them ?

or anything wrong here ? @Query("select a.id,a.createdTime,a.msgTime,a.counter,a.status,a.localTransactionId from AceEventsEntity a " + "where a.localTransactionId in " + "(select b.localTransactionId from AceEventsEntity b) order by a.createdTime DESC") Page<AceEventsEntityInfo> findAllByDto(Pageable pageable);

This is the query I use to get the data to the grid

this is interface based projection so theoretically it should get from the entity class

How should an interface based projection know about the corresponding entity and use their hash code? Sounds like you need to override the getId method from your data provider

BTW, what’s the reason for the where condition in the query? the subquery is on the same table as the main query. I do not understand what’s the purpose of the IN condition. Out of curiosity, could you explain what do you want to achieve?

This table gets events from various sources and each transaction contains an unique id. So, this is to group them based on that unique id. I cannot use group by because it does not allow me to group just by one column.

Yes, that’s the problem
image.png

if Vaadin can throw some error, saying unable to render data due to duplicate hashcode/equals that would be helpful