[DC-747] Sequence name of build process is different to the one used in UnitOfWorks (based on DC521 with updated TestCase) Created: 17/Jun/10  Updated: 17/Apr/14

Status: Open
Project: Doctrine 1
Component/s: None
Affects Version/s: 1.2.3
Fix Version/s: None

Type: Bug Priority: Critical
Reporter: Enrico Stahn Assignee: Jonathan H. Wage
Resolution: Unresolved Votes: 0
Labels: None
Environment:

doctrine 1.2.4, symfony 1.4, snow leopard, php 5.3.1, postgresql 8.3


Attachments: File DC747TestCase.php    

 Description   

I moved our project from doctrine 1.2.1 to 1.2.4. The build process stops because of this patch. We are using primary keys with an alias. It seems that the generation of the sequence name in the build-process is different to the one used in UnitOfWorks.

Example:

Authority:
columns:
a_id:

{ name: a_id as id, type: integer, primary: true, autoincrement: true }

name:

{ type: string }

This will generate a sequence called "authority_a_id", but it will try no "currval" the sequence "authority_id".

I'll try to provide a UnitTest. The current seems broken.

php -l Ticket/DC521TestCase.php
PHP Parse error: syntax error, unexpected $end, expecting T_FUNCTION in Ticket/DC521TestCase.php on line 143

Parse error: syntax error, unexpected $end, expecting T_FUNCTION in Ticket/DC521TestCase.php on line 143
Errors parsing Ticket/DC521TestCase.php



 Comments   
Comment by Enrico Stahn [ 17/Jun/10 ]

Here is the test updated with the current ticket number.

Comment by Enrico Stahn [ 17/Jun/10 ]

Updated. Now it should work/not work as expected.

Comment by Enrico Stahn [ 17/Jun/10 ]

This isn't a blocker anymore because of the workaround i've found.

  • remove autoincrement
  • add sequence name manually

Example:

Authority:
columns:
a_id:

{ name: a_id as id, type: integer, primary: true, sequence: authority_a_id }

name:

{ type: string }
Generated at Thu Dec 18 05:41:13 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.