8000 [#9551] Added caution directive explaining the backticks · symfony/symfony-docs@99fa4a1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 99fa4a1

Browse files
committed
[#9551] Added caution directive explaining the backticks
1 parent 1795bd7 commit 99fa4a1

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

security/guard_authentication.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,13 @@ property they use to access their account via the API::
7171
// more getters/setters
7272
}
7373

74+
.. caution::
75+
76+
In the example above, the table name is ``user``. This is a reserved SQL
77+
keyword and `must be quoted with backticks`_ in Doctrine to avoid errors.
78+
You might also change the table name (e.g. with ``app_users``) to solve
79+
this issue.
80+
7481
.. tip::
7582

7683
This User doesn't have a password, but you can add a ``password`` property if
@@ -587,3 +594,5 @@ Frequently Asked Questions
587594
to actually authenticate the user. You can continue doing that (see previous
588595
question) or use the ``User`` object from FOSUserBundle and create your own
589596
authenticator(s) (just like in this article).
597+
598+
.. _`must be quoted with backticks`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/basic-mapping.html#quoting-reserved-words

0 commit comments

Comments
 (0)
0