Count in a list

Hi, a have an entity with several bookings for several rooms. How can I get a list (data grid) of bookings that says: For room 4711 today 10 bookings For room 4712 today 2 bookings For room 4711 tomorrow 4 bookings   I tried it with the counter but was only able to count all bookings. ;-)    
2 answers

Hi Tjark Radewaldt,

You should try to follow link



A piece of a possible solution:

You could count the number of bookings for a room using an aggregate function in a datagrid. For this, you do have to change the association to a many-to-many, refering to each other.

“today” and “tomorrow” are relative to current datetime, this is tricky, also given timezone issues. You may want to consider if that is essential enough to be worth the trouble.