FOSUserBundle icon indicating copy to clipboard operation
FOSUserBundle copied to clipboard

Override mapping file for User class

Open Ranklin opened this issue 11 years ago • 0 comments

Hi!

I'm creating a website for a MMORPG, and the user table on my database must contain exactly 8 columns (id, name, passwd, email, money......) with specifics columns names.

I looked almost everywhere, and it's not really easy... My first solution was to create an another table (named "Account" with my specifics columns names) and match it with the base User table: id -> id username -> name password -> passwd email -> email (No more "Salt" or "Canonical" columns!) (I created my own password encoder)

This is not really a clean solution but...

And my problem is that my database is not empty, so I tried to register an User with an empty User table and an Account table with about 70 already created accounts... Well MySQL didn't really appreciate :/

So I decided to override the existing mapping (in Resources > config > doctrine > User.orm.xml) But it didn't works :0

However, MyUserBundle extends well the FosUserBundle! (Btw, i'm using the latest version of Symfony2)

I don't really get it :(

I would appreciate if you have a solution or an idea to make somthing clean

In advance, thanks!

(Sorry if I made English's faults, but I'm French ^^)

Ranklin avatar Jul 29 '14 07:07 Ranklin