Discuss your project

Category

Sonata

26 articles Page 3

Symfony 4 / Sonata: Use a primary key with a /

As strange as it may seem, I had to use an entity with a primary key set on a varchar field, and some values contained a " / ".Until you are faced with the problem, it's impossible to imagine that it will cause an issue. And then, the drama unfolds. An exception has been thrown during the rendering of a template ("Parameter "id" for route "admin_app_wtype_edit" must match "[^/]++" ("MACHIN/CHOSE" given) to generate a corresponding URL."). In short, ...

Symfony 4 / Sonata: Create a OneToMany (1N) administration

We are going to create a 1N administration interface, with two entities. The first one, One, and the second, Many, and set up an admin panel for the One table, which can affect several elements of the Many table. To spice things up, we'll add some additional parameters, such as timestamp fields for sync dates with an SI, and primary fields that are not called ID and are not auto-incremented. In our case, we have a sync with an SI that requires a timestamp fi...