Bug #26196

Doctrine2: Object of class F3\FLOW3\Resource\Resource could not be converted to string

Added by Julian Kleinhans almost 10 years ago. Updated almost 10 years ago.

Status:
Closed
Priority:
Should have
Category:
Persistence
Target version:
-
Start date:
2011-04-23
Due date:
% Done:

0%

Estimated time:
PHP Version:
Has patch:
Complexity:

Description

Since Doctrine2 integration i had the following error if i will store a Resource

#1: Catchable Fatal Error: Object of class F3\FLOW3\Resource\Resource could not be converted to string in /FLOW3/Packages/Framework/FLOW3/Resources/PHP/Doctrine/DBAL/Statement.php line 98 (More information)

For example:

$flagResource = $this->resourceManager->importResource('resource://Tutorials/Public/Images/Icons/Germany.png');

$languageModel = $this->objectManager->create('F3\Tutorials\Domain\Model\Language');
$languageModel->setName('German');
$languageModel->setOriginalResource($flagResource);
$this->languageRepository->add($languageModel);

Its strange, because F3\FLOW3\Resource\Resource is an entity and not an valueobject thats need a _toString method

Also available in: Atom PDF