[FLOW3-general] Resources in Entity Model
David Sporer
david.sporer at googlemail.com
Thu Aug 2 16:01:56 CEST 2012
Ok I think I got it myself after I looked at the database.
Adding @ORM\OneToOne solves the problem.
-----Ursprüngliche Nachricht-----
Von: flow3-general-bounces at lists.typo3.org
[mailto:flow3-general-bounces at lists.typo3.org] Im Auftrag von David Sporer
Gesendet: Donnerstag, 2. August 2012 15:47
An: flow3-general at lists.typo3.org
Betreff: [FLOW3-general] Resources in Entity Model
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
_______________________________________________
FLOW3-general mailing list
FLOW3-general at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/flow3-general
More information about the FLOW3-general
mailing list