[FLOW3-general] Transient properties and property mapping

Alexander Berl a.berl at eol.de
Thu Apr 26 23:24:24 CEST 2012


Hi everyone,

I'm currently in the process of creating a user registration process for a web page and therefore have a user model with properties name, email, password with validators and an authentication account.
Since I only need the password for user creation and for password change (and because it's bad storing plaintext passwords) I want this property to be transient to the persistence and only be stored inside the account object, which I achieved with the @FLOW3\Transient annotation.
However, on the create action I receive a property mapping Exception:

#1297759968: Exception while property mapping at property path "": Property "password" was not found in target object of type "Foo\Bar\Domain\Model\User"

The problem here is, that the property is skipped in reflection due to the Transient annotation (see ReflectionService->addPropertiesToClassSchema) and therefore also cannot be property mapped.

So how would I go about setting a transient property with a form for validation? Any workarounds or would it make sense to change the reflection to distinguish between persistence reflection (as needed for Doctrine afaik) and general reflection.

Cheers,
Alexander


More information about the FLOW3-general mailing list