[FLOW3-general] Doctrine errors with external table

Fernando Arconada falcifer2001 at yahoo.es
Tue May 24 12:35:26 CEST 2011


Hello

I have defined a php model to use an existing table and a custom id


-----------------
 * @scope prototype
 * @entity
 * @table(name="empresa")
 */
class Empresa {
    /**
	 * El texto del saludo
	 *
	 * @var integer
	 * @id
     	* @Column(name="id", type="integer")
	 */
	protected $id = '';

    /**
     * @var string
     * @validate Text, StringLength(minimum = 1, maximum = 80)
	 * @Column(length="80")
     */
    protected $name = '';
-----------------------------

This happens:

- FLOW3 also creates the flow3_persistence_identifier column+
- an SQL error is displayed "Uncaught Exception in FLOW3 #42000: 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 'primary ON empresa' at line 1 
thrown in file Packages/Framework/FLOW3/Resources/PHP/Doctrine/DBAL/
Connection.php in line 577" cause it tries to "DROP INDEX primary ON 
empresa" why it tries to drop my index?
- When I tried to insert a new record the it dont create a new id, eve if 
I try @GeneratedValue

- If it try: @GeneratedValue at id property an exception is raised when I 
try to insert a new value: "SQLSTATE[HY093]: Invalid parameter number: 
number of bound variables does not match number of tokens "


Kind Regards

Fernando Arconada


More information about the FLOW3-general mailing list