Bug #51082
Object Route Parts should take persistence_object_identifier into account
Status: | Resolved | Start date: | 2013-08-15 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | Bastian Waidelich | % Done: | 100% |
|
Category: | MVC - Routing | |||
Target version: | - | |||
PHP Version: | Complexity: | easy | ||
Has patch: | No | Affected Flow version: | (any) |
Description
If no uriPattern is set for a Object Route Part it defaults to the identity properties of the entity. It should also work to fallback to the persistence_object_identifier instead which doesn't happen atm but results in an exception.
Associated revisions
[BUGFIX] Object Route Parts fall back to technical identifier
As described in the routing section of the documentation, the
`Object Route Parts`` should use the technical identifier to
represent an object if no uriPattern is specified and the
specified object does not contain any identity properties.
Instead an exception was thrown if no uriPattern could be
determined because ``ClassSchema::getIdentityProperties()``
doesn't return the property name of the technical identifier.
This change fixes this by falling back by skipping the
ObjectPathMapping if no uriPattern is defined.
Change-Id: Ic06641be676ab514b8004164e90ffd15b6730cca
Releases: master, 2.0
Fixes: #51082
[BUGFIX] Object Route Parts fall back to technical identifier
As described in the routing section of the documentation, the
`Object Route Parts`` should use the technical identifier to
represent an object if no uriPattern is specified and the
specified object does not contain any identity properties.
Instead an exception was thrown if no uriPattern could be
determined because ``ClassSchema::getIdentityProperties()``
doesn't return the property name of the technical identifier.
This change fixes this by falling back by skipping the
ObjectPathMapping if no uriPattern is defined.
Change-Id: Ic06641be676ab514b8004164e90ffd15b6730cca
Releases: master, 2.1, 2.0
Fixes: #51082
History
#1 Updated by Bastian Waidelich almost 2 years ago
FYI: This is how it used to be. The IdentityRoutePart uses ClassSchema::getIdentityProperties() to retrieve the properties that identify an entity. Apparently this does not work any longer if an object only uses the automagical persistence_object_identifier..
#2 Updated by Christian Müller almost 2 years ago
- Status changed from New to Accepted
Alright, so this is really a bug. I was not sure if the current behavior was intentional.
#3 Updated by Bastian Waidelich almost 2 years ago
- Assigned To set to Bastian Waidelich
I'm fixing this now
#4 Updated by Gerrit Code Review almost 2 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/24490
#5 Updated by Bastian Waidelich almost 2 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 3ca238501129a075a4b1dfe67b536e9df2fb2081.
#6 Updated by Gerrit Code Review over 1 year ago
- Status changed from Resolved to Under Review
Patch set 1 for branch 2.0 of project Packages/TYPO3.Flow has been pushed to the review server.
It is available at https://review.typo3.org/27729
#7 Updated by Gerrit Code Review over 1 year ago
Patch set 2 for branch 2.0 of project Packages/TYPO3.Flow has been pushed to the review server.
It is available at https://review.typo3.org/27729
#8 Updated by Gerrit Code Review over 1 year ago
Patch set 3 for branch 2.0 of project Packages/TYPO3.Flow has been pushed to the review server.
It is available at https://review.typo3.org/27729
#9 Updated by Gerrit Code Review over 1 year ago
Patch set 4 for branch 2.0 of project Packages/TYPO3.Flow has been pushed to the review server.
It is available at https://review.typo3.org/27729
#10 Updated by Bastian Waidelich over 1 year ago
- Status changed from Under Review to Resolved
Applied in changeset f81d39fe5a2a8b636e2c7e51643c6cb5df9931ca.