#1600: Oracle foreignKeys name is too long
-------------------------------------------+--------------------------------
Reporter: adrive | Owner: jwage
Type: defect | Status: new
Priority: minor | Milestone: 1.1.0
Component: Import/Export | Version: 1.1-DEV
Keywords: Oracle Export Identifier name | Has_test: 0
Mystatus: Pending Core Response | Has_patch: 1
-------------------------------------------+--------------------------------
Oracle doesn't support identifiers (table names, colum names,
constraint...) longer than 30 chars.
In `Doctrine::getExportableFormat` there is generated name for
foreignKeys, which is composed from local table name, local column name,
relation table name and relation column name, which can give very long
identifiers:
`sf_guard_group_permission_permission_id_sf_guard_permission_id`.
There should be some driver specific method to generate such constraint
name, or we can just avoid to use named constraints for foreign keys in
Oracle.
I added to Doctrine_Export_Oracle class method getForeignKeyDeclaration
where I truncate the $definition['name'] to 30 chars if longer, but this
solution could lead to some collisions, as there is no chec, whether the
constraint with the truncate name already exists.
The second solution just removes name index from $defintion, which is a
little bit better, because Oracle will handle the name of the constraint.
I think, that name `SYS484932` is as readable and clear as
`sf_guard_group_permission_permission_id_sf_guard_permission_id`.
--
Ticket URL: <http://trac.doctrine-project.org/ticket/1600>
Doctrine <http://www.phpdoctrine.org>
PHP Doctrine Object Relational Mapper
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"doctrine-svn" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.co.uk/group/doctrine-svn?hl=en-GB
-~----------~----~----~----~------~----~------~--~---