[FLOW3-general] Own User-Model (instead of Party)

Søren Malling soren.malling at gmail.com
Fri Feb 22 11:17:47 CET 2013


Hi Winder,

You _have_ to extend AbstractParty form the TYPO3.Party package, it's
required by the TYPO3 Flow account.

Then create the migrations


Søren Malling

Twitter: twitter.com/sorenmalling


On Fri, Feb 22, 2013 at 11:02 AM, Widmer Cornel <cornel at kollerinternet.ch>wrote:

> Thanks for your help. Done as adviced, but there is no COLLATION statement.
> Looks like the problem is in my php-class.
>
> Here it is:
>
> <?php
> namespace WS\Rico\Domain\Model;
>
> /*                                                                        *
> * This script belongs to the TYPO3 Flow package "WS.Rico".               *
> *                                                                        *
> *                                                                        */
>
> use Doctrine\ORM\Mapping as ORM;
> use TYPO3\Flow\Annotations as Flow;
>
> /**
> * An User
> *
> * @Flow\Entity
> */
> class User {
>
>         /**
>          * @var \TYPO3\Flow\Security\Account
>          * @ORM\OneToOne(mappedBy="user")
>          */
>         protected $account;
>
>         /**
>          * @var string
>          * @Flow\Validate(type="NotEmpty"**)
>          * @Flow\Validate(type="**StringLength", options={ "minimum"=1,
> "maximum"=1 })
>          */
>         protected $gender;
>
>         /**
>          * @var string
>          * @Flow\Validate(type="NotEmpty"**)
>          * @Flow\Validate(type="**StringLength", options={ "minimum"=2,
> "maximum"=100 })
>          */
>         protected $firstName;
>
>         /**
>          * @var string
>          * @Flow\Validate(type="NotEmpty"**)
>          * @Flow\Validate(type="**StringLength", options={ "minimum"=2,
> "maximum"=100 })
>          */
>         protected $lastName;
>
>         /**
>          * @var string
>          * @Flow\Validate(type="NotEmpty"**)
>          * @Flow\Validate(type="**EmailAddress")
>          */
>         protected $emailBusiness;
>
>         /**
>          * @var string
>          * @Flow\Validate(type="**EmailAddress")
>          */
>         protected $emailPrivate = '';
>
>         /**
>          * @var string
>          * @Flow\Validate(type="NotEmpty"**)
>          * @Flow\Validate(type="**StringLength", options={ "minimum"=5,
> "maximum"=100 })
>          */
>         protected $phoneBusiness;
>
>         /**
>          * @var string
>          * @Flow\Validate(type="**StringLength", options={ "minimum"=5,
> "maximum"=100 })
>          */
>         protected $phonePrivate = '';
>
>         /**
>          * @var string
>          */
>         protected $registrationData = '';
>
>
>         /**
>          * Constructs this Person
>          *
>          */
>         public function __construct() {
>         }
>
>         /**
>          * Returns the account of this user
>          *
>          * @param \TYPO3\Flow\Security\Account $account
>          * @return void
>          */
>         public function setAccount($account) {
>                 $this->account = $account;
>         }
>
>         /**
>          * Returns the account of this user
>          *
>          * @return \TYPO3\Flow\Security\Account
>          */
>         public function getAccount() {
>                 return $this->account;
>         }
>
>         /**
>          * Setter for gender
>          *
>          * @param string $gender
>          * @return void
>          */
>         public function setGender($gender) {
>                 $this->gender = $gender;
>         }
>
>         /**
>          * Getter for gender
>          *
>          * @return string
>          */
>         public function getGender() {
>                 return $this->gender;
>         }
>
>         /**
>          * Setter for firstName
>          *
>          * @param string $firstName
>          * @return void
>          */
>         public function setFirstName($firstName) {
>                 $this->firstName = $firstName;
>         }
>
>         /**
>          * Getter for firstName
>          *
>          * @return string
>          */
>         public function getFirstName() {
>                 return $this->firstName;
>         }
>
>         /**
>          * Setter for lastName
>          *
>          * @param string $lastName
>          * @return void
>          */
>         public function setLastName($lastName) {
>                 $this->lastName = $lastName;
>         }
>
>         /**
>          * Getter for lastName
>          *
>          * @return string
>          */
>         public function getLastName() {
>                 return $this->lastName;
>         }
>
> }
>
> ?>
>
>
> Quote: Søren Malling wrote on Fri, 22 February 2013 10:52
> ------------------------------**----------------------
>
>  Hi Widmer,
>>
>>
>> Create a migration by running ./flow doctrine:migrationgenerate and look
>> for the COLLATION thing in the generated migration
>>
>>
>> Søren Malling
>>
>> Twitter: twitter.com/sorenmalling
>>
>>
>> On Fri, Feb 22, 2013 at 10:49 AM, Widmer Cornel <cornel at kollerinternet.ch
>> >**wrote:
>>
>> > Hi Søren
>> >
>> > I've seen your post in here. Yes, there are some update-issues with
>> > doctrine when I try to doctrine:update.
>> > Where should I remove this "COLLATION" thing?
>> >
>> > As a side note: I'm working on windows ...
>> >
>> > ______________________________****_________________
>> > FLOW3-general mailing list
>> > FLOW3-general at lists.typo3.org
>> > http://lists.typo3.org/cgi-****bin/mailman/listinfo/flow3-****general<http://lists.typo3.org/cgi-**bin/mailman/listinfo/flow3-**general>
>> <http://lists.typo3.**org/cgi-bin/mailman/listinfo/**flow3-general<http://lists.typo3.org/cgi-bin/mailman/listinfo/flow3-general>
>> >
>> >
>>
> ------------------------------**----------------------
>
>
>
> ______________________________**_________________
> FLOW3-general mailing list
> FLOW3-general at lists.typo3.org
> http://lists.typo3.org/cgi-**bin/mailman/listinfo/flow3-**general<http://lists.typo3.org/cgi-bin/mailman/listinfo/flow3-general>
>


More information about the FLOW3-general mailing list