Remove mapped doctrine field of parentclass in Sym

2019-08-09 09:42发布

How is it possible to remove a field that got inherited as doctrine column from mapping?

Example:

In FosUserBundle, I don't need some of the columns (e.g. salt, expiresAt...) within my User class. How can I tell symfony/doctrine to not map this column anymore to the database / remove it from the mapping? I know how to "reconfigure" the columns by using @AttributeOverride, but how can I completly remove a field from the mapping?

Regards.

1条回答
倾城 Initia
2楼-- · 2019-08-09 10:25

Pretty much all default properties of the FOSUB User entity are mandatory to make the bundle working as expected.

The fields you given (salt, expiresAt) are related to the security, as the most part of the User properties.

Remove one of them may have side effects in your user management.

Also, you can't Selectively inherit parts of an entity.

查看更多
登录 后发表回答