mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX: Pass correct class to allowPrimaryKeyEditing in yaml fixture
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@101171 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
52538032a8
commit
f9836b0f01
@ -178,9 +178,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…
x
Reference in New Issue
Block a user