#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
Resolution: | Keywords: Oracle Export Identifier name
Has_test: 0 | Mystatus: Pending Core Response
Has_patch: 1 |
----------------------------+-----------------------------------------------
Comment (by adrive):
I thought about the format of fk constraint name - we should let the user
choose his own format, that should be composed from:
localTableName, localColumnName, referencedTableName,
referencedColumnName. and it would be nice to have here also relation
name.
For example if I have models:
{{{
Group:
table: my_group
columns:
id:
User:
table: my_user
columns:
id: integer
group_id: integer
relations:
group:
class: Group
local: group_id
foreign: id
}}}
I think the prettiest fk name will be: fk_user_group (generated from model
name) or fk_my_user_my_group (generated from table name) and than
truncated to maximum allowed length by the database. I think all database
servers have its own limits.
But I do not have an idea how to ensure the unique name for the
constraints. And also I am not sure, which classes should handle this. But
I will try to create a patch for it.
--
Ticket URL: <http://trac.doctrine-project.org/ticket/1600#comment:3>
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
-~----------~----~----~----~------~----~------~--~---