[Flow] problem with class extended from none entity class

Tomas M flow at 46dev.de
Tue Jun 9 15:24:24 CEST 2015


Hello again!

I've got a problem by using a class which is extended
from a class with no entity.
It seems to be the same problem describend in bug #47809
which should be fixed since two years.
(https://forge.typo3.org/issues/47809)

In detail, my "none entity class" looks like this:

// note: NO ENTITY HERE!
class Comment {
	
	/**
	* the Comments title
	* @var string
	* @Flow\Validate(type="Text")
	* @Flow\Validate(type="StringLength", options={ "minimum"=5, "maximum"=80 })
	* @ORM\OrderBy({"title" = "ASC"})
	*/
	protected $commentTitle;
	
	/**
	 * @var string
	 * @Flow\Validate(type="NotEmpty")
	 * @ORM\Column(type="text")
	 */
	protected $commentText;

..

(of course no repository here.)




The extended class looks like this:

/**
 * @Flow\Entity
 */
class FooComment extends Comment {

	/**
	 * @var \MY\tests\Domain\Model\Foo
	 * @ORM\ManyToOne(inversedBy="comments")
	 */
	protected $foo;
	

..

Here a repo exists: "FooCommentRepository".



This throws an excpetion:

Message

  Uncaught Exception: TYPO3\Flow\Error\Exception

  Message
    Notice: Undefined index: MY\tests\Domain\Model\Comment in

    ...../Packages/Framework/TYPO3.Flow/Classes/TYPO3/Flow/Reflection/ReflectionService.php
    line 1601

    
    
My Flow version is "Flow 2.3".
I've checked if patch for bug #47809 is applied: yes, it is!


In my opinion the construction should work.

Any ideas, why it does not???



More information about the Flow mailing list