This example will use the entity OrderDetail where a derived field will be added. Enter the following triple:
OrderProcessing.OrderDetail has a derived FLD LineTotal.
Generate Changes.
On the test Model there is an OrderProcessingbuildObjects list object that contains all the template generation functions for all the entities in the application.
After generating the OrderProcessingbuildObjects list we need to generate ApplicationServerObject that contains all the server objects of the application:
Now go to eclipse.
To import all the generated function right click and refresh the java project:
Then look for Custom Derived Calculations.inc. Add code for the derived field:
Then run the Application Generator:
When the application is running do the following:
Now right click and refresh the web project.
Run tomcat server.
See that Line Total is a derived attribute and is calculated. The calculation of line total is Quantity x Product Price.