With doctrine if you execute this code
$columns = $accountTable->getColumns();
foreach ($columns as $column)
{
print_r($column);
}
you could get for example this as result:
Array
(
[type] => integer
[length] => 20
[autoincrement] => 1
[primary] => 1
)
Array
(
[type] => s开发者_运维知识库tring
[length] => 255
)
Is there a way to add custom properties to a column, so that the result would be:
Array
(
[type] => integer
[length] => 20
[autoincrement] => 1
[primary] => 1
[customproperty] => customvalue
)
Array
(
[type] => string
[length] => 255
)
You can do this:
$accountTable->setColumnOption('column', 'option', 'value');
If you want this to persist, you're probably best off setting this in the AccountTable class itself.
精彩评论