[FLOW3-general] inheritance und repositories
Steffen Wickham
steffen at gaming-inc.de
Fri Apr 5 22:05:53 CEST 2013
Hi Mathis,
it's a really simple solution! I will post my repository but some
explanation first:
I'd created two concrete classes called "RefereeAssignment" and
"ClubAssignment" which are derived from the same base class
"AbstractAssignment". All data can be accessed by the
"AssignmentRepository" which only consists of the following code:
<?php
namespace AFSVN\Basic\Domain\Repository;
use TYPO3\Flow\Annotations as Flow;
/**
* Repository for parties
*
* @Flow\Scope("singleton")
*/
class AssignmentRepository extends \TYPO3\Flow\Persistence\Repository {
const ENTITY_CLASSNAME = 'AFSVN\Basic\Domain\Model\AbstractAssignment';
}
?>
So you only have to set the base class as entity for the Repository
manually, otherwise Flow will determine the type itself.
Yours
Steffen
Am 05.04.2013 21:51, schrieb Mathis Hoffmann:
> Hi!
>
> I have some trouble implementing inheritance in my FLOW-app. The
> situation is as follows: I have an abstract superclass Customer with
> two subclasses BusinessCustomer and PrivateCustomer. Inheritance
> itself is working as it should. What I want to achieve now is that I
> have a CustomerRepository which enables me to list all Customers.
> Creating such a repository and a corresponding actioncontroller ends
> up in "No class schema found for
> "HdM\Accounting\Domain\Model\Customer"". Does anyone have a solution
> how that could work?
>
> Thank's in advance!
> Mathis Hoffmann
>
>
> _______________________________________________
> FLOW3-general mailing list
> FLOW3-general at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow3-general
More information about the FLOW3-general
mailing list