Bug #26196

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

Added by Julian Kleinhans over 4 years ago. Updated over 4 years ago.

Status:Closed Start date:2011-04-23
Priority:Should have Due date:
Assigned To:Karsten Dambekalns % Done:

0%

Category:Persistence
Target version:-
PHP Version: Complexity:
Has patch: Affected Flow version:

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

History

#1 Updated by Julian Kleinhans over 4 years ago

hum i think the way i go is not correct.. will check it later again

#2 Updated by Karsten Dambekalns over 4 years ago

  • Category changed from Resource to Persistence
  • Status changed from New to Needs Feedback
  • Assigned To set to Karsten Dambekalns
  • Priority changed from Must have to Should have
  • Target version deleted (1.0 beta 1)

Show me your Language domain model code...

#3 Updated by Julian Kleinhans over 4 years ago

Dont no why, but it works now.. close and thx

#4 Updated by Karsten Dambekalns over 4 years ago

  • Status changed from Needs Feedback to Closed

Also available in: Atom PDF