[FLOW3-general] ORM Problems with 1.0
Patrick Sernetz
patrickse at googlemail.com
Fri Oct 28 11:38:15 CEST 2011
Hi Folks,
I really have a problem with the doctrine in flow3. I´ve tried to setup a
OneToOne Relation within the domain model. According to the doctrine
documentation, this should be fine. BUt I am running into a problem when
updating the scheme with the flow commandline tool.
Here´s my class
<?php
namespace PS\Test\Domain\Model;
/* *
* This script belongs to the FLOW3 package "CSG.Hibernate". *
* *
* */
use TYPO3\FLOW3\Annotations as FLOW3;
use Doctrine\ORM\Mapping as ORM;
/**
* A Email message
*
* @FLOW3\Scope("prototype")
* @FLOW3\Entity
*/
class EmailMessage {
/**
* @var string
*/
protected $subject;
/**
* @var string
*/
protected $body;
/**
* @var PS\Test\Domain\Model\EmailAddress
* @ORM\OneToOne
*/
protected $from;
/**
* @var PS\Test\Domain\Model\EmailAddress
* @ORM\OneToOne
*/
protected $recipients;
}
?>
And the error message looks like that...
patrick at ps-vm:/var/www/flow3$ ./flow3 doctrine:update
Uncaught Exception
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error
in your SQL syntax; check the manual that corresponds to your MySQL
server version for the right syntax to use near 'from VARCHAR(40) DEFAULT
NULL, recipients VARCHAR(40) DEFAULT NULL, subject VARC' at line 1
More Information
Exception code #42000
File
/var/www/FLOW3-1.0.0/Packages/Framework/Doctrine/Classes/DBAL/Connection.php
I am pretty sure that I am doing something wrong. Maybe one of you could
give me a hint.
Thanks in advanced,
Patrick
More information about the FLOW3-general
mailing list