[Flow] How to define targetEntity in abstractClass
Christian Loock
chl at vkf-renzel.de
Wed Jul 23 16:27:53 CEST 2014
Just as a side node: Isn't there a doctrine plugin that allows you to
save revisions of your domain models? I think this is what I mean:
https://github.com/Atlantic18/DoctrineExtensions
The Loggable extension. Maybe someone has a flow ready implementation if
that to use?
On 23.07.2014 16:23, Alexander Wende wrote:
> Hi Regine,
>
> thanks for your reply, again.
>
> Quote: Regine Rosewich wrote on Wed, 23 July 2014 13:05
> ----------------------------------------------------
>> as far as I understand your idea, you want to create something which I
>> would call a vector which begins with an initial revision of an
>> object and
>> points from revision to revision until the last one. The logical
>> error you
>> made is in my opinion that you tried to create a pointer/vector which is
>> pointing in both directions, forward and backwards. That is from my
>> point
>> of view not necessary. I think It's enough to create a simple
>> parent-child
>> structure to get what you want.
>
> First I'll try to explain my idea better.
> The application I build should be the core of our new intranet.
> The content is nearly completly maintained in a decentralized way.
> All users can edit pages, news and so on. Every content should be
> revision-safe, so that it could switched back to a previous state.
> A main feature is that the user can jump from revision to revision and
> can compare the different revisions.
>
> This is why I build pointer in both directions - to make the revision
> browsing easy. The revision concept works but only with the page
> model. I was not able to implement another model e.g. news.
>
> But now I found the problem!!!
>
> I used
>
> /**
> * Nächste Revision
> * Nicht gesetzt falls es sich um die neueste Revision handelt.
> * @var \COMPANY\Revising\Domain\Model\RevisionInterface
> * @ORM\OneToOne(mappedBy="previousRevision")
> * @ORM\Column(nullable=true)
> */
>
> but it has to be
> /**
> * Nächste Revision
> * Nicht gesetzt falls es sich um die neueste Revision handelt.
> * @var \COMPANY\Revising\Domain\Model\AbstractRevision
> * @ORM\OneToOne(mappedBy="previousRevision")
> * @ORM\Column(nullable=true)
> */
>
> I had to use the abstract class in the @var annotation!! *HeadToDesk*
>
> Thanks again for your input. I thought about it a long time... maybe I
> will refactor it later.
> _______________________________________________
> Flow mailing list
> Flow at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow
--
Christian Loock
Web Developer
Renzel Agentur
www.renzel-agentur.de
More information about the Flow
mailing list