Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions security/entity_provider.rst
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,13 @@ For this entry, suppose that you already have a ``User`` entity inside an
To make things shorter, some of the getter and setter methods aren't shown.
But you can generate these manually or with your own IDE.

.. caution::

In the example above, the User entity's table name is "app_users" because
"USER" is a SQL reserved word. If you wish to call your table name "user",
`it must be quoted with backticks`_ to avoid errors. The annotation should
look like ``@ORM\Table(name="`user`")``.

Next, make sure to :ref:`create the database table <doctrine-creating-the-database-tables-schema>`:

.. code-block:: terminal
Expand Down Expand Up @@ -572,3 +579,4 @@ or worry about it.

.. _fixtures: https://symfony.com/doc/master/bundles/DoctrineFixturesBundle/index.html
.. _FOSUserBundle: https://github.com/FriendsOfSymfony/FOSUserBundle
.. _`it must be quoted with backticks`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/basic-mapping.html#quoting-reserved-words