DDC-1642: Inserting a new entity with a custom mapping type does not trigger requireSQLConversion when column name is defined #2062

Closed
opened 2026-01-22 13:39:15 +01:00 by admin · 3 comments
Owner

Originally created by @doctrinebot on GitHub (Feb 9, 2012).

Jira issue originally created by user ruimarinho:

When a new entity is created with a custom type mapping (e.g. "ip") and it requires an SQL conversion defined on the type itself, the convertToDatabaseValueSQL function is not called.

Example mapping:

ipAddress: { type: ip, nullable: true, column: ip_address }

If the column attribute is not defined, everything works as expected. Updating an entity is also unaffected (_updateTable works fine).

Attached is a patch that fixes this.

Originally created by @doctrinebot on GitHub (Feb 9, 2012). Jira issue originally created by user ruimarinho: When a new entity is created with a custom type mapping (e.g. "ip") and it requires an SQL conversion defined on the type itself, the convertToDatabaseValueSQL function is not called. Example mapping: ipAddress: { type: ip, nullable: true, column: ip_address } If the column attribute is not defined, everything works as expected. Updating an entity is also unaffected (_updateTable works fine). Attached is a patch that fixes this.
admin added the Bug label 2026-01-22 13:39:15 +01:00
admin closed this issue 2026-01-22 13:39:16 +01:00
Author
Owner

@doctrinebot commented on GitHub (Feb 13, 2012):

Comment created by @guilhermeblanco:

Fixed by merge: 38d725ce32

@doctrinebot commented on GitHub (Feb 13, 2012): Comment created by @guilhermeblanco: Fixed by merge: https://github.com/doctrine/doctrine2/commit/38d725ce32b01ba7af40fb91c9454ea44fbe5ab5
Author
Owner

@doctrinebot commented on GitHub (Feb 13, 2012):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (Feb 13, 2012): Issue was closed with resolution "Fixed"
Author
Owner

@doctrinebot commented on GitHub (Dec 13, 2015):

Imported 1 attachments from Jira into https://gist.github.com/05c66036ecd73229d498

@doctrinebot commented on GitHub (Dec 13, 2015): Imported 1 attachments from Jira into https://gist.github.com/05c66036ecd73229d498 - [11157_custom_type.patch](https://gist.github.com/05c66036ecd73229d498#file-11157_custom_type-patch)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#2062