[DDC-852] An easy way of generally setting the default id name/foreign key name suffix doctrine uses Created: 31/Oct/10 Updated: 05/Jul/12 Resolved: 24/Dec/11 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | Mapping Drivers |
| Affects Version/s: | 2.0-BETA4 |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | New Feature | Priority: | Minor |
| Reporter: | Daniel Alvarez Arribas | Assignee: | Fabio B. Silva |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Doctrine 2 is currently using "id" as the default name for identifier columns, and "_id" as suffix for corresponding foreign key columns. I think this is quite reasonable in most cases. Now, assuming that for any reason I wanted to change this to something else for all relationships, currently there does not seem to be any easy way to do it. /**
The reason why I am doing this is that I am doing a 1:1 data import based on a data model that is already defined, and it just happens to contain properties named "id", It would be great to have a less redundant way of configuring Doctrine to use a different name/suffix generally, e.g. by calling a setter method on the configuration object, like |
| Comments |
| Comment by Marc Hodgins [ 01/Nov/10 ] |
|
Related to |
| Comment by Benjamin Eberlei [ 24/Dec/11 ] |
|
Related Pull Request was closed: https://github.com/doctrine/doctrine2/pull/241 |
| Comment by Guilherme Blanco [ 24/Dec/11 ] |
|
FIxed in https://github.com/doctrine/doctrine2/commit/abb258c951dd416fc5325ef548d15c7acd35703e |
| Comment by Benjamin Eberlei [ 05/Jul/12 ] |
|
A related Github Pull-Request [GH-391] was opened |