Configuring Business Object Types
In this section we are going to cover how to change Category's business object type. You may want to change how the business object behaves by changing its type. In this example, we want our Category business object to act as both a parent and a child business object. To do this, we will need to change the type from EditableRoot to Switchable Object.
You can configure each entities business object type quickly and easily through Manage Outputs. Lets start by right clicking the Entities.csp template and selecting Manage Outputs. After the manage outputs dialog comes up double click on the Entities.cst item. You can control exactly what gets generated right inside of Edit Outputs.
Now lets change Category from an EditableRoot to SwitchableObject. We can do this by selecting the "..." button for the SwitchableObject Property. Next, we would hold the control key to allow selection of multiple items and select Category.
As you can see, the Category database table was removed from EditableRoot and placed into Switchable Object!
Now we can save our settings by clicking the OK button on the Edit Output dialog. When we regenerate the project, the criteria business object will be regenerated as an SwitchableObject.
In the next step we are going to cover generating business objects from a stored procedure or view.