Skip to content
Advertisement

Easy Admin 3 Sort by date returns: create_date has no field or association named create_date

I’m trying to sort a field either by asc or desc date.

When i add the date field to my backend like so

JavaScript

It works and it shows, but when i try to sort it i get the following error

JavaScript

Does anyone know why or how this happens ?

Thank you

EDIT: here is the field in MyEntity

JavaScript

Advertisement

Answer

You are not respecting the proper spelling for your property.

In your entity, the field is called createDate so you should use the same name when configuring your crud.

In your case :

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement