An example of creating a hierarchy of BiskitDef similar to Location. Where a parent can have many children of the same type of BiskitDef and a child will have only one parent. We will create one called Organisation.
1.Go to Admin->Bakery.
1.Click the + next to Biskit Def to open the Biskit Tree
2.Select any Biskit.
3.Press the Create button to create a new Biskit and enter edit mode.
5.Update the meta-properties of the Biskit.
a)Change Type to be the new BiskitDef name, in this case Organisation.
b)Change Filter Group to help find all the new BisketDefs using the Filter Biskit Group... button
c)In Properties Add New
i.Change Name to name
d)Change Name Property on the BisketDef to point to the new name property
6.Create a new property. a)Change Type to Biskit. b)Change Name to parent c)Change BiskitDef to BiskitDef (Organisation is not know yet because we have not saved so use this as a holder) d)Leave Biskit Property Type as To One. |
|
|
|
7.Create a new property a)Change Type to Set. b)Change Name to children c)Change BiskitDef to BiskitDef (Organisation is not known yet because we have not saved so use this as a holder) d)Leave Biskit Property Type as One To Many
|
8.Press the Save button. There will be an error:
Check the error by pressing Show Log. If the error is complaining about a property not having the correct BisketDef press the OK button, and then the Save Despite Errors button.
9.Press the Edit button to get back into edit mode.
10.Select the Parent property a)Change BisketDef to Organisation. b)Change Biskit Property Type to Many To One c)Change Inverse Property to children |
11.Press the Save button, there will be an error, Save Despite Error. This is needed so that when the children property is set up it finds the completed parent property to set up Inverse Property
12.Press the Edit button to get back into edit mode.
13.Select the Children property. a)Change BisketDef to Organisation. b)Change Biskit Property Type to One To Many c)Change Reference Deletion Option to Set Null d)Change Inverse Property to parent |
14.Change the Hierarchy Property meta-property of the Organisation Biskit to be children.
15.Press the Save button.
16.If there are no errors the database will need to be updated:
a)Press Update DB Schema to implement changes in the DB, and then run the script to apply the changes
b)Press Validate Biskits button to check the database Biskits.
c)Press Reload Database Configuration, to load the new database into Calpendo
d)Refresh the browser