...
This tutorial will help you in building your first "Demo Application" in OFBiz.
Info | ||
---|---|---|
| ||
This tutorial is intended to be used with the branch 14.12 and 15.12 of Apache OFBiz. Very soon you will get a list of tutorials based on branches, release, and trunk. It will help you deciding which one to be referred. It will make further updates easy for this tutorial. For any questions or concerns, please use OFBiz User Mailing List. Details about the mailing lists are available here. |
...
Code Block | ||
---|---|---|
| ||
<?xml version="1.0" encoding="UTF-8"?> <entitymodel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/entitymodel.xsd"> <title>Entity of an Open For Business Project Component</title> <description>None</description> <version>1.0</version> <entity entity-name="OfbizDemoType" package-name="org.ofbiz.ofbizdemo" title="OfbizDemo Type Entity"> <field name="ofbizDemoTypeId" type="id-ne"><description>primary sequenced ID</description></field> <field name="description" type="description"></field> <prim-key field="ofbizDemoTypeId"/> </entity> <entity entity-name="OfbizDemo" package-name="org.ofbiz.ofbizdemo" title="OfbizDemo Entity"> <field name="ofbizDemoId" type="id-ne"><description>primary sequenced ID</description></field> <field name="ofbizDemoTypeId" type="id-ne"></field> <field name="firstName" type="name"></field> <field name="lastName" type="name"></field> <field name="comments" type="comment"></field> <prim-key field="ofbizDemoId"/> <relation type="one" fk-name="ODEM_OD_TYPE_ID" rel-entity-name="OfbizDemoType"> <key-map field-name="ofbizDemoTypeId"/> </relation> </entity> </entitymodel> |
Now have a look at $OFBIZ_HOME/hot-deploy/ofbizdemo/ofbiz-component.xml file. You already have resource entry made in it for loading these entities from their definitions to database when component loads. As shown below:
...