mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: Pass correct class to allowPrimaryKeyEditing in yaml fixture (from r101171)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@111969 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
477709f0da
commit
25cddf944c
@ -183,9 +183,9 @@ class YamlFixture extends Object {
|
||||
|
||||
// The database needs to allow inserting values into the foreign key column (ID in our case)
|
||||
$conn = DB::getConn();
|
||||
if(method_exists($conn, 'allowPrimaryKeyEditing')) $conn->allowPrimaryKeyEditing($dataClass, true);
|
||||
if(method_exists($conn, 'allowPrimaryKeyEditing')) $conn->allowPrimaryKeyEditing(ClassInfo::baseDataClass($dataClass), true);
|
||||
$obj->write(false, true);
|
||||
if(method_exists($conn, 'allowPrimaryKeyEditing')) $conn->allowPrimaryKeyEditing($dataClass, false);
|
||||
if(method_exists($conn, 'allowPrimaryKeyEditing')) $conn->allowPrimaryKeyEditing(ClassInfo::baseDataClass($dataClass), false);
|
||||
}
|
||||
|
||||
// Populate the dictionary with the ID
|
||||
|
Loading…
Reference in New Issue
Block a user