mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Corrected parameters in model relations example
An identifier needs to be specified when creating an object with relations, but the example had omitted that.
This commit is contained in:
parent
1621d6afde
commit
76cf3c3ed9
@ -158,7 +158,7 @@ Model relations can be expressed through the same notation as in the YAML fixtur
|
||||
described earlier, through the `=>` prefix on data values.
|
||||
|
||||
:::php
|
||||
$obj = $factory->createObject('MyObject', array(
|
||||
$obj = $factory->createObject('MyObject', 'myobj1', array(
|
||||
'MyHasManyRelation' => '=>MyOtherObject.obj1,=>MyOtherObject.obj2'
|
||||
));
|
||||
|
||||
@ -225,4 +225,4 @@ By default, blueprint names equal the class names they manage.
|
||||
// $myPageObj->MyProperty = My Default Value
|
||||
// $myPageObj->MyOtherProperty = My Custom Value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user