Bug #33883
Repositories must be singleton, but no checks are done on this
Status: | Resolved | Start date: | 2012-02-13 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | Karsten Dambekalns | % Done: | 100% |
|
Category: | Persistence | |||
Target version: | TYPO3 Flow Base Distribution - 1.1 | |||
PHP Version: | Complexity: | |||
Has patch: | No | Affected Flow version: | Git master |
Description
I have models with injected repositories and due to some change in the last 2 weeks in master I can no longer use FLOW3, since the following error comes up:
Undefined method 'getDefaultOrderings'. The method name must start with either findBy or findOneBy!
This was tracable to the fact that \TYPO3\FLOW3\Reflection\ObjectAccess::isPropertyGettable checks for is_callable, which returns true for every method in Repositories (due to the magic __call method) which in turn causes \TYPO3\FLOW3\Validation\Validator\GenericObjectValidator::getPropertyValue to not use the direct property access, even though it would be needed.
Related issues
Associated revisions
[BUGFIX] Check that repositories are of singleton scope
Repositories must be singletons, otherwise strange things and
seemingly weird errors happen. This change adds a check for the
scope, so that developers at least know what is wrong.
Change-Id: Ic3782452e941574dd85068535092877efd7ca190
Fixes: #33883
Releases: 1.1
[BUGFIX] (Persistence): Fix failing RepositoryTest
The test fails since Ic3782452e941574dd85068535092877efd7ca190 which
forgot to adjust the Unit Tests.
Change-Id: I3be86c157afd345bad310aa03d9ba2276c2a8350
Related: #33883
Releases: 1.1
History
#1 Updated by Kira Backes over 3 years ago
It is "fixable" by setting the scope of the repositories to Singleton
#2 Updated by Karsten Dambekalns over 3 years ago
- Subject changed from ObjectValidation fails, partially unusable system to Repositories must be singleton, but no checks are done on this
- Category set to Persistence
- Status changed from New to Accepted
- Assigned To set to Karsten Dambekalns
- Priority changed from Must have to Should have
- Target version set to 1.1
Well, repositories must be singleton, otherwise I don't even want to imagine what happens…
I changed the bug title accordingly.
#3 Updated by Gerrit Code Review over 3 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 http://review.typo3.org/10899
#4 Updated by Karsten Dambekalns over 3 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 5e342192819640b75bb54f86873622e537af810b.