使用FOSUserBundle创建自定义字段 [英] Creating Custom Field with FOSUserBundle

查看:87
本文介绍了使用FOSUserBundle创建自定义字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用FOSUserBundle添加地址和电话号码.如何使用FOSuserBundle添加自定义"字段,以使配置文件包含地址和电话号码....

I want to add an address and telephone number using FOSUserBundle. How can I add a Custom fields, with FOSuserBundle, to have a profile that contains address and telephone number....

推荐答案

问题出在: 当我遵循symfony文档时: https://github.com/步骤a)教义ORM用户类中的FriendsOfSymfony/FOSUserBundle/blob/master/Resources/doc/index.md 我创建了一个包含User.orm.yml的文件夹原则:

the problem is in : when i follow the symfony documentation:https://github.com/FriendsOfSymfony/FOSUserBundle/blob/master/Resources/doc/index.md in step a) Doctrine ORM User class i have created a folder doctrine contains User.orm.yml:

Acme \ UserBundle \ Entity \ User: 类型:实体 表:fos_user ID: ID: 类型:整数 发电机: 策略:自动

Acme\UserBundle\Entity\User: type: entity table: fos_user id: id: type: integer generator: strategy: AUTO

此文件可粉碎您实体中的所有更新以及数据库shemea的更新.解决方案是删除此文件夹.

this file crush any update in your entities and update of your database shemea .The solution is to delete this folder.

这篇关于使用FOSUserBundle创建自定义字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆