-
Notifications
You must be signed in to change notification settings - Fork 76
do not fail on non-default naming strategies #330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…on non-default naming strategies
|
||
<indexes> | ||
<index name="name_idx" columns="name"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the name field is not defined in the Model class, only in the Doctrine\ORM class. moved it down - i hope it is possible to add indexes from several mapping files.
@Ocramius is this what you meant by "prefixing" in #309 (comment) ? |
@Nielsb85 @steve-todorov does this look like it would fix the issue you described in #309? |
@dbu I sadly don't know this config format, and therefore can't answer your question :-( |
@Ocramius its the same for all mappings, e.g. annotations has this: https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Mapping/Index.php . they are all based on the column name and no way to specify the field of the entity and have the column looked up from the evaluated metadata. |
@Nilsb85 would you mind checking if this fix works for you? |
@dbu will check asap. I hope somewhere beginning of next week. |
thanks. i merge this now so that we can tag RC1. looking forward to your feedback, we can still fix things until next week and then release a stable 1.4.0 |
do not fail on non-default naming strategies
@dbu the schema is updated successfully. There is a minor inconsistency now with the column name staticPrefix, which is the only column that is now in camel case while the rest is using underscore. But it does fix the problem I described. |
thanks for the follow-up. yes, that can't be avoided without overwritting the mapping in your project, unfortunately. at least the configuration setting now does not break the application anymore. |
hardcode column names that are used in index definitions to not fail on non-default naming strategies.
as far as i can tell, this should be no BC break, as non-default naming strategies previously must have lead to an error as described in #309. if the user overwrote the mapping, they will not see the change we do here.
fix #309