Skip to content

do not fail on non-default naming strategies for the 1.3 #334

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
Changelog
=========

* **2016-01-09**: [ORM] Hardcoded some column names to match what we index on to avoid
issues with non-default `orm.naming_strategy`. It is now safe to use a non-default
naming strategy. If you did a workaround to use a naming strategy, you might need to
look into that.
* **2015-10-28**: Deprecated `cmf_routing.dynamic.persistence.phpcr.route_basepath`
setting and parameter in favor of `cmf_routing.dynamic.persistence.phpcr.route_basepaths`.
The old names will be kept for BC reasons and removed in 2.0.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this changelog entry is for 1.4 only


1.3.0
-----

1.3.0-RC1
---------

Expand Down
4 changes: 2 additions & 2 deletions Resources/config/doctrine-model/Route.orm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

<mapped-superclass name="Symfony\Cmf\Bundle\RoutingBundle\Model\Route">
<field name="variablePattern" type="string" nullable="true"/>
<field name="staticPrefix" type="string" nullable="true"/>
<!-- we hardcode the column name to overwrite column naming strategies as we have to define the index on the column name -->
<field name="staticPrefix" type="string" nullable="true" column="staticPrefix"/>

<indexes>
<index name="name_idx" columns="name"/>
<index name="prefix_idx" columns="staticPrefix"/>
</indexes>
</mapped-superclass>
Expand Down
7 changes: 6 additions & 1 deletion Resources/config/doctrine-orm/Route.orm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,14 @@
<generator strategy="AUTO"/>
</id>

<field name="name" type="string" unique="true"/>
<!-- we hardcode the column name to overwrite column naming strategies as we have to define the index on the column name -->
<field name="name" type="string" unique="true" column="name"/>
<field name="position" type="integer"/>

<indexes>
<index name="name_idx" columns="name"/>
</indexes>

</entity>

</doctrine-mapping>