[FLOW3-general] Resources in Entity Model
David Sporer
david.sporer at googlemail.com
Thu Aug 2 15:47:26 CEST 2012
Hey guys,
it's me again - I think this could be another topic for the cookbook if it's
possible http://wiki.typo3.org/FLOW3_Cookbook.
If I have a model where I store information about an object and there are
images or other files related to the model, can I add Resource object to the
model do I have to create another Resource-Model to store the images?
E.g. if I try something like this I get the error
Uncaught Exception The mapping of field 'background' is invalid: The option
'OneToOne' is required.
/**
* A Pass
*
* @FLOW3\Scope("prototype")
* @FLOW3\Entity
*/
class Document {
/**
* The name
* @var string
*/
protected $name;
/**
* The description
* @var string
*/
protected $description;
/**
* @var \TYPO3\FLOW3\Resource\Resource
*/
protected $background;
.
}
Best regards
David
More information about the FLOW3-general
mailing list