Bug #3837

Objects added to a repository are not found if repository doesn't follow naming conventions

Added by Robert Lemke almost 12 years ago. Updated over 10 years ago.

Status:
Resolved
Priority:
Must have
Category:
Persistence
Start date:
2009-07-07
Due date:
% Done:

100%

Estimated time:
PHP Version:
Has patch:
Complexity:

Description

We have a model called \F3\TYPO3\Domain\Model\Structure\Site and a repository called \F3\TYPO3\Domain\Repository\SiteRepository.

Note that the repository doesn't follow the naming conventions – it should rather be called \F3\TYPO3\Domain\Repository\Structure\SiteRepository.

If a Site object is added to the (first) repository, it will be sucessfully stored in the CR. However, executing findAll() on the repository won't return any object because the repository's createQuery() method assumes the correct (second) repository name. This is a good thing but should also be enforced while adding objects.

Solution:
Define the model class name during construction / initialization of the repository and use that name everywhere in the repository functions to check objects passed to the repository against it.

#1

Updated by Robert Lemke almost 12 years ago

  • Assignee set to Karsten Dambekalns
#2

Updated by Karsten Dambekalns almost 12 years ago

  • Status changed from New to Accepted
#3

Updated by Karsten Dambekalns almost 12 years ago

  • Status changed from Accepted to Resolved
  • % Done changed from 0 to 100

Applied in changeset r2877.

Also available in: Atom PDF