Feature #1634

Allow omitting the @reference annotation for object properties

Added by Robert Lemke about 13 years ago. Updated about 11 years ago.

Status:
Resolved
Priority:
Should have
Category:
Persistence
Target version:
-
Start date:
2008-10-02
Due date:
% Done:

100%

Estimated time:
PHP Version:
Has patch:
Complexity:

Description

Currently all properties of type object which are supposed to be persisted need to be annotated as a reference:

    /**
     * Content attached to this structure node
     *
     * @var F3::TYPO3::Domain::Model::ContentInterface
     * @reference
     */
    protected $content;

I'd say that this is counter-intuitive for most developers. Ideally the persistence framework would recognize object properties and assume that they are references:

    /**
     * Content attached to this structure node
     *
     * @var F3::TYPO3::Domain::Model::ContentInterface
     */
    protected $content;

If the object should not be persisted, @transient is used (as usual).

Also available in: Atom PDF