Entity budget_item has not relation with entity budget
------------------------------------------------------

                 Key: OFBIZ-1844
                 URL: https://issues.apache.org/jira/browse/OFBIZ-1844
             Project: OFBiz
          Issue Type: Bug
          Components: accounting
    Affects Versions: SVN trunk
         Environment: Entity model
            Reporter: Tanakorn
            Priority: Critical
             Fix For: SVN trunk


The entity budget_item has two primary key: budget_id and budget_item_seq_id. 
The issue is budget_id should be a foreign key to entity budget.

<entity entity-name="BudgetItem"
            package-name="org.ofbiz.accounting.budget"
            title="Budget Item Entity">
      <field name="budgetId" type="id-ne"></field>
      <field name="budgetItemSeqId" type="id-ne"></field>
      <field name="budgetItemTypeId" type="id"></field>
      <field name="amount" type="currency-amount"></field>
      <field name="purpose" type="long-varchar"></field>
      <field name="justification" type="long-varchar"></field>
      <prim-key field="budgetId"/>
      <prim-key field="budgetItemSeqId"/>
+     <relation type="one" fk-name="BUDGET" rel-entity-name="Budget">
+      <key-map field-name="budgetId"/>
+     </relation>
      <relation type="one" fk-name="BUDGET_ITEM_BTYP" 
rel-entity-name="BudgetItemType">
        <key-map field-name="budgetItemTypeId"/>
      </relation>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to