Handle error when comparing with MagmaDate
Get exact entities count from batch table
OPAL-2547 Entities cache applies only to views.