sdiaz / FOSRestBundleByExample

FOSRestBundle example project with Symfony 2.6 standard distribution
MIT License
106 stars 31 forks source link

Rename the user table #24

Open ohmer1 opened 8 years ago

ohmer1 commented 8 years ago

I installed the bundle and configured it to use my local postgresql server. It failed because of the user table ("user" is a reserved keyword for postgresql). After I changed the entity configuration, the bundle worked w/o problem with postgresql.

diff --git a/src/AppBundle/Entity/User.php b/src/AppBundle/Entity/User.php
index 5c3e2a7..abc1c90 100644
--- a/src/AppBundle/Entity/User.php
+++ b/src/AppBundle/Entity/User.php
@@ -20,7 +20,7 @@ use Gedmo\Mapping\Annotation as Gedmo;
* User
*
* @Gedmo\Loggable
- * @ORM\Table()
+ * @ORM\Table(name="utilisateur")
  * @ORM\Entity()
 */