#1481: Application-level cascade definition via YML doesn't work.
-----------------------------------+----------------------------------------
Reporter: nodkz | Owner: jwage
Type: defect | Status: new
Priority: major | Milestone: 1.0.3
Component: Schema Files | Version: 1.0
Keywords: yml, shema, cascade | Has_test: 0
Mystatus: Pending Core Response | Has_patch: 1
-----------------------------------+----------------------------------------
{{{
BillItem:
local: id
foreign: bill_id
type: many
cascade: [delete] # <-- BUILDER does not write in {object}Base.php
this line
}}}
It is not copy of ticket #1234.
Builder does not write in {object}Base.php this line {... 'cascade' =>
array('delete') ... }
Error in following method Doctrine_Import_Builder::buildSetUp().
There ara nothing about cascade.
{{{
if (isset($relation['refClass'])) {
$a[] = '\'refClass\' => ' .
$this->varExport($relation['refClass']);
}
if (isset($relation['deferred']) && $relation['deferred'])
{
$a[] = '\'default\' => ' .
$this->varExport($relation['deferred']);
}
if (isset($relation['local']) && $relation['local']) {
$a[] = '\'local\' => ' .
$this->varExport($relation['local']);
}
if (isset($relation['foreign']) && $relation['foreign']) {
$a[] = '\'foreign\' => ' .
$this->varExport($relation['foreign']);
}
if (isset($relation['onDelete']) && $relation['onDelete'])
{
$a[] = '\'onDelete\' => ' .
$this->varExport($relation['onDelete']);
}
if (isset($relation['onUpdate']) && $relation['onUpdate'])
{
$a[] = '\'onUpdate\' => ' .
$this->varExport($relation['onUpdate']);
}
if (isset($relation['equal']) && $relation['equal']) {
$a[] = '\'equal\' => ' .
$this->varExport($relation['equal']);
}
if (isset($relation['owningSide']) &&
$relation['owningSide']) {
$a[] = '\'owningSide\' => ' .
$this->varExport($relation['owningSide']);
}
if ( ! empty($a)) {
$ret[$i] .= ', ' . 'array(';
$length = strlen($ret[$i]);
$ret[$i] .= implode(',' . PHP_EOL . str_repeat(' ',
$length), $a) . ')';
}
}}}
[[BR]]
[[BR]]
[[BR]]
NEED append after owningSide:
{{{
if (isset($relation['cascade']) && $relation['cascade']) {
$a[] = '\'cascade\' => ' .
$this->varExport($relation['cascade']);
}
}}}
--
Ticket URL: <http://trac.doctrine-project.org/ticket/1481>
Doctrine <http://www.phpdoctrine.org>
PHP Doctrine Object Relational Mapper
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"doctrine-svn" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.co.uk/group/doctrine-svn?hl=en-GB
-~----------~----~----~----~------~----~------~--~---