Bug #30223

Column names for association properties are generated wrong

Added by Karsten Dambekalns about 10 years ago. Updated about 10 years ago.

Status:
Resolved
Priority:
Must have
Category:
Persistence
Start date:
2011-09-23
Due date:
% Done:

100%

Estimated time:
PHP Version:
Has patch:
Complexity:

Description

As discovered by Bastian, column names for associations are created in model tables not with the property name but the name that is to be used for join tables.

Examle:

/**
 * @var \TYPO3\FLOW3\Resource\Resource
 */
 protected $foo;

would create a column named flow3_resource_resource instead of the expected foo.


Related issues

Has duplicate TYPO3.Flow - Bug #29982: Wrong table structure for multiple ManyToOne relationsResolvedKarsten Dambekalns2011-09-18

Actions
#1

Updated by Karsten Dambekalns about 10 years ago

  • Subject changed from column names for association properties are generated wrong to Column names for association properties are generated wrong
#2

Updated by Karsten Dambekalns about 10 years ago

  • % Done changed from 0 to 90

The issue is fixed, the fix will be pushed for review as soon as I have the needed migrations ready.

#3

Updated by Mr. Hudson about 10 years ago

  • Status changed from Accepted to Under Review

Patch set 1 of change Ia32cfcc6cd49385a61845243e67cb0ddd62f5268 has been pushed to the review server.
It is available at http://review.typo3.org/5291

#4

Updated by Mr. Hudson about 10 years ago

Patch set 2 of change Ia32cfcc6cd49385a61845243e67cb0ddd62f5268 has been pushed to the review server.
It is available at http://review.typo3.org/5291

#5

Updated by Mr. Hudson about 10 years ago

Patch set 3 of change Ia32cfcc6cd49385a61845243e67cb0ddd62f5268 has been pushed to the review server.
It is available at http://review.typo3.org/5291

#6

Updated by Karsten Dambekalns about 10 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 90 to 100
#7

Updated by Bastian Waidelich about 10 years ago

Hint for developers that come across this and need to upgrade their packages:
It is not possible for Doctrine to detect that change automatically, it will drop the previous table and create a new one instead (AFAIK).
You can solve this by fixing the migration that is generated by ./flow3 doctrine:migrationgenerate manually. See http://git.typo3.org/FLOW3/Packages/FLOW3.git?a=commit;h=395997deae0c4230636276d0c2c0bf7a22d6fcc1 for an example

Also available in: Atom PDF