mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
how Ignoring field when inserting data with Doctrine ORM #5314
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @akmumu on GitHub (Nov 4, 2016).
Originally assigned to: @Ocramius on GitHub.
i got
SQLSTATE[23000]: Integrity constraint violation: 1048 Unknown error 1048error,this because my table has too many fileds, some of that i hope doctrine will ignore that when insert,but i got many null.
@Ocramius commented on GitHub (Nov 4, 2016):
Don't map it in your entity, and it will not be persisted.
On 4 Nov 2016 08:01, "Qinglong Zhang" notifications@github.com wrote:
@akmumu commented on GitHub (Nov 4, 2016):
@Ocramius if i do not map these, i can not use getXXX,and setXXX
@Ocramius commented on GitHub (Nov 4, 2016):
Yes, either that or set defaults on the entity fields. DB-side generated
fields are not supported.
On 4 Nov 2016 08:18, "Qinglong Zhang" notifications@github.com wrote: