Bug #33883

Repositories must be singleton, but no checks are done on this

Added by Kira Backes over 9 years ago. Updated over 9 years ago.

Status:
Resolved
Priority:
Should have
Category:
Persistence
Start date:
2012-02-13
Due date:
% Done:

100%

Estimated time:
PHP Version:
Has patch:
No
Complexity:

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.

#1

Updated by Kira Backes over 9 years ago

It is "fixable" by setting the scope of the repositories to Singleton

#2

Updated by Karsten Dambekalns over 9 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
  • Assignee 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 9 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 9 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF