[jira] Created: (OFBIZ-1845) Why PaymentBudgetAllocation's budgetid and budgetitemseqid was not foreing key for budgetitem

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (OFBIZ-1845) Why PaymentBudgetAllocation's budgetid and budgetitemseqid was not foreing key for budgetitem

Nicolas Malin (Jira)
Why PaymentBudgetAllocation's budgetid and budgetitemseqid was not foreing key for budgetitem
---------------------------------------------------------------------------------------------

                 Key: OFBIZ-1845
                 URL: https://issues.apache.org/jira/browse/OFBIZ-1845
             Project: OFBiz
          Issue Type: Bug
          Components: accounting
    Affects Versions: SVN trunk
         Environment: /applications/accounting/entitydef/entitymodel.xml
            Reporter: Tanakorn
            Priority: Trivial
             Fix For: SVN trunk


I see you intent to make two of compound key (budgetId and budgetItemSeqId) have relation-type = nofk that not similar to "The Data Model Resource Book Vol.1" in Figure 8.10. I think you have to has a reason implementation

/applications/accounting/entitydef/entitymodel.xml

<entity entity-name="PaymentBudgetAllocation"
            package-name="org.ofbiz.accounting.payment"
            title="Payment Budget Allocation Entity">
      <field name="budgetId" type="id-ne"></field>
      <field name="budgetItemSeqId" type="id-ne"></field>
      <field name="paymentId" type="id-ne"></field>
      <field name="amount" type="currency-amount"></field>
      <prim-key field="budgetId"/>
      <prim-key field="budgetItemSeqId"/>
      <prim-key field="paymentId"/>
      <relation type="one" fk-name="PAYMENT_BA_BDGT" rel-entity-name="Budget">
        <key-map field-name="budgetId"/>
      </relation>
 -    <relation type="one-nofk" rel-entity-name="BudgetItem">
+   <relation type="one" fk-name="PAYMENT_BUDGIT" rel-entity-name="BudgetItem">
        <key-map field-name="budgetId"/>
        <key-map field-name="budgetItemSeqId"/>
      </relation>
      <relation type="one" fk-name="PAYMENT_BA_PMT" rel-entity-name="Payment">
        <key-map field-name="paymentId"/>
      </relation>
    </entity>

and another question in the same figure in the book (Figure 8.10). In order_item has two attribute that is budgetId and budgetItemSeqId but you don't use it to link to budget_item entity, and I don't know why?

<entity entity-name="OrderItem"
            package-name="org.ofbiz.order.order"
            never-cache="true"
            title="Order Item Entity">
      <field name="orderId" type="id-ne"></field>
      <field name="orderItemSeqId" type="id-ne"></field>
      <field name="externalId" type="id"></field>
      <field name="orderItemTypeId" type="id-ne"></field>
      <field name="orderItemGroupSeqId" type="id-ne"></field>
      <field name="isItemGroupPrimary" type="indicator"></field>
      <field name="fromInventoryItemId" type="id"></field>
      <field name="budgetId" type="id"></field>
      <field name="budgetItemSeqId" type="id"></field>
      ...
+   <relation type="one" fk-name="ORDER_ITEM_BUDGET_ITEM" rel-entity-name="BudgetItem">
        <key-map field-name="budgetId"/>
        <key-map field-name="budgetItemSeqId"/>
      </relation>

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

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-1845) Why PaymentBudgetAllocation's budgetid and budgetitemseqid was not foreing key for budgetitem

Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-1845?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tanakorn updated OFBIZ-1845:
----------------------------

    Description:
I see you intent to make two of compound key (budgetId and budgetItemSeqId) have relation-type = nofk that not similar to "The Data Model Resource Book Vol.1" in Figure 8.10. I think you have to has a reason implementation

/applications/accounting/entitydef/entitymodel.xml

<entity entity-name="PaymentBudgetAllocation"
            package-name="org.ofbiz.accounting.payment"
            title="Payment Budget Allocation Entity">
      <field name="budgetId" type="id-ne"></field>
      <field name="budgetItemSeqId" type="id-ne"></field>
      <field name="paymentId" type="id-ne"></field>
      <field name="amount" type="currency-amount"></field>
      <prim-key field="budgetId"/>
      <prim-key field="budgetItemSeqId"/>
      <prim-key field="paymentId"/>
      <relation type="one" fk-name="PAYMENT_BA_BDGT" rel-entity-name="Budget">
        <key-map field-name="budgetId"/>
      </relation>
 -    <relation type="one-nofk" rel-entity-name="BudgetItem">
+   <relation type="one" fk-name="PAYMENT_BUDGIT" rel-entity-name="BudgetItem">
        <key-map field-name="budgetId"/>
        <key-map field-name="budgetItemSeqId"/>
      </relation>
      <relation type="one" fk-name="PAYMENT_BA_PMT" rel-entity-name="Payment">
        <key-map field-name="paymentId"/>
      </relation>
    </entity>

and another question in the same figure in the book (Figure 8.10). In order_item has two attribute that is budgetId and budgetItemSeqId but you don't use it to link to budget_item entity, and I don't know why?

/applications/order/entitydef/entitymodel.xml

<entity entity-name="OrderItem"
            package-name="org.ofbiz.order.order"
            never-cache="true"
            title="Order Item Entity">
      <field name="orderId" type="id-ne"></field>
      <field name="orderItemSeqId" type="id-ne"></field>
      <field name="externalId" type="id"></field>
      <field name="orderItemTypeId" type="id-ne"></field>
      <field name="orderItemGroupSeqId" type="id-ne"></field>
      <field name="isItemGroupPrimary" type="indicator"></field>
      <field name="fromInventoryItemId" type="id"></field>
      <field name="budgetId" type="id"></field>
      <field name="budgetItemSeqId" type="id"></field>
      ...
+   <relation type="one" fk-name="ORDER_ITEM_BUDGET_ITEM" rel-entity-name="BudgetItem">
+      <key-map field-name="budgetId"/>
+       <key-map field-name="budgetItemSeqId"/>
+    </relation>

  was:
I see you intent to make two of compound key (budgetId and budgetItemSeqId) have relation-type = nofk that not similar to "The Data Model Resource Book Vol.1" in Figure 8.10. I think you have to has a reason implementation

/applications/accounting/entitydef/entitymodel.xml

<entity entity-name="PaymentBudgetAllocation"
            package-name="org.ofbiz.accounting.payment"
            title="Payment Budget Allocation Entity">
      <field name="budgetId" type="id-ne"></field>
      <field name="budgetItemSeqId" type="id-ne"></field>
      <field name="paymentId" type="id-ne"></field>
      <field name="amount" type="currency-amount"></field>
      <prim-key field="budgetId"/>
      <prim-key field="budgetItemSeqId"/>
      <prim-key field="paymentId"/>
      <relation type="one" fk-name="PAYMENT_BA_BDGT" rel-entity-name="Budget">
        <key-map field-name="budgetId"/>
      </relation>
 -    <relation type="one-nofk" rel-entity-name="BudgetItem">
+   <relation type="one" fk-name="PAYMENT_BUDGIT" rel-entity-name="BudgetItem">
        <key-map field-name="budgetId"/>
        <key-map field-name="budgetItemSeqId"/>
      </relation>
      <relation type="one" fk-name="PAYMENT_BA_PMT" rel-entity-name="Payment">
        <key-map field-name="paymentId"/>
      </relation>
    </entity>

and another question in the same figure in the book (Figure 8.10). In order_item has two attribute that is budgetId and budgetItemSeqId but you don't use it to link to budget_item entity, and I don't know why?

<entity entity-name="OrderItem"
            package-name="org.ofbiz.order.order"
            never-cache="true"
            title="Order Item Entity">
      <field name="orderId" type="id-ne"></field>
      <field name="orderItemSeqId" type="id-ne"></field>
      <field name="externalId" type="id"></field>
      <field name="orderItemTypeId" type="id-ne"></field>
      <field name="orderItemGroupSeqId" type="id-ne"></field>
      <field name="isItemGroupPrimary" type="indicator"></field>
      <field name="fromInventoryItemId" type="id"></field>
      <field name="budgetId" type="id"></field>
      <field name="budgetItemSeqId" type="id"></field>
      ...
+   <relation type="one" fk-name="ORDER_ITEM_BUDGET_ITEM" rel-entity-name="BudgetItem">
        <key-map field-name="budgetId"/>
        <key-map field-name="budgetItemSeqId"/>
      </relation>


> Why PaymentBudgetAllocation's budgetid and budgetitemseqid was not foreing key for budgetitem
> ---------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-1845
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1845
>             Project: OFBiz
>          Issue Type: Bug
>          Components: accounting
>    Affects Versions: SVN trunk
>         Environment: /applications/accounting/entitydef/entitymodel.xml
>            Reporter: Tanakorn
>            Priority: Trivial
>             Fix For: SVN trunk
>
>
> I see you intent to make two of compound key (budgetId and budgetItemSeqId) have relation-type = nofk that not similar to "The Data Model Resource Book Vol.1" in Figure 8.10. I think you have to has a reason implementation
> /applications/accounting/entitydef/entitymodel.xml
> <entity entity-name="PaymentBudgetAllocation"
>             package-name="org.ofbiz.accounting.payment"
>             title="Payment Budget Allocation Entity">
>       <field name="budgetId" type="id-ne"></field>
>       <field name="budgetItemSeqId" type="id-ne"></field>
>       <field name="paymentId" type="id-ne"></field>
>       <field name="amount" type="currency-amount"></field>
>       <prim-key field="budgetId"/>
>       <prim-key field="budgetItemSeqId"/>
>       <prim-key field="paymentId"/>
>       <relation type="one" fk-name="PAYMENT_BA_BDGT" rel-entity-name="Budget">
>         <key-map field-name="budgetId"/>
>       </relation>
>  -    <relation type="one-nofk" rel-entity-name="BudgetItem">
> +   <relation type="one" fk-name="PAYMENT_BUDGIT" rel-entity-name="BudgetItem">
>         <key-map field-name="budgetId"/>
>         <key-map field-name="budgetItemSeqId"/>
>       </relation>
>       <relation type="one" fk-name="PAYMENT_BA_PMT" rel-entity-name="Payment">
>         <key-map field-name="paymentId"/>
>       </relation>
>     </entity>
> and another question in the same figure in the book (Figure 8.10). In order_item has two attribute that is budgetId and budgetItemSeqId but you don't use it to link to budget_item entity, and I don't know why?
> /applications/order/entitydef/entitymodel.xml
> <entity entity-name="OrderItem"
>             package-name="org.ofbiz.order.order"
>             never-cache="true"
>             title="Order Item Entity">
>       <field name="orderId" type="id-ne"></field>
>       <field name="orderItemSeqId" type="id-ne"></field>
>       <field name="externalId" type="id"></field>
>       <field name="orderItemTypeId" type="id-ne"></field>
>       <field name="orderItemGroupSeqId" type="id-ne"></field>
>       <field name="isItemGroupPrimary" type="indicator"></field>
>       <field name="fromInventoryItemId" type="id"></field>
>       <field name="budgetId" type="id"></field>
>       <field name="budgetItemSeqId" type="id"></field>
>       ...
> +   <relation type="one" fk-name="ORDER_ITEM_BUDGET_ITEM" rel-entity-name="BudgetItem">
> +      <key-map field-name="budgetId"/>
> +       <key-map field-name="budgetItemSeqId"/>
> +    </relation>

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

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-1845) Why PaymentBudgetAllocation's budgetid and budgetitemseqid was not foreing key for budgetitem

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-1845?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tanakorn updated OFBIZ-1845:
----------------------------

    Description:
I see you intent to make two of compound key (budgetId and budgetItemSeqId) have relation-type = nofk that not similar to "The Data Model Resource Book Vol.1" in Figure 8.10. I think you have to has a good reason for implementation

/applications/accounting/entitydef/entitymodel.xml

<entity entity-name="PaymentBudgetAllocation"
            package-name="org.ofbiz.accounting.payment"
            title="Payment Budget Allocation Entity">
      <field name="budgetId" type="id-ne"></field>
      <field name="budgetItemSeqId" type="id-ne"></field>
      <field name="paymentId" type="id-ne"></field>
      <field name="amount" type="currency-amount"></field>
      <prim-key field="budgetId"/>
      <prim-key field="budgetItemSeqId"/>
      <prim-key field="paymentId"/>
      <relation type="one" fk-name="PAYMENT_BA_BDGT" rel-entity-name="Budget">
        <key-map field-name="budgetId"/>
      </relation>
 -    <relation type="one-nofk" rel-entity-name="BudgetItem">
+   <relation type="one" fk-name="PAYMENT_BUDGIT" rel-entity-name="BudgetItem">
        <key-map field-name="budgetId"/>
        <key-map field-name="budgetItemSeqId"/>
      </relation>
      <relation type="one" fk-name="PAYMENT_BA_PMT" rel-entity-name="Payment">
        <key-map field-name="paymentId"/>
      </relation>
    </entity>

and another question in the same figure in the book (Figure 8.10). In order_item has two attribute that is budgetId and budgetItemSeqId but you don't use it to link to budget_item entity, and I don't know why?

/applications/order/entitydef/entitymodel.xml

<entity entity-name="OrderItem"
            package-name="org.ofbiz.order.order"
            never-cache="true"
            title="Order Item Entity">
      <field name="orderId" type="id-ne"></field>
      <field name="orderItemSeqId" type="id-ne"></field>
      <field name="externalId" type="id"></field>
      <field name="orderItemTypeId" type="id-ne"></field>
      <field name="orderItemGroupSeqId" type="id-ne"></field>
      <field name="isItemGroupPrimary" type="indicator"></field>
      <field name="fromInventoryItemId" type="id"></field>
      <field name="budgetId" type="id"></field>
      <field name="budgetItemSeqId" type="id"></field>
      ...
+   <relation type="one" fk-name="ORDER_ITEM_BUDGET_ITEM" rel-entity-name="BudgetItem">
+      <key-map field-name="budgetId"/>
+       <key-map field-name="budgetItemSeqId"/>
+    </relation>

  was:
I see you intent to make two of compound key (budgetId and budgetItemSeqId) have relation-type = nofk that not similar to "The Data Model Resource Book Vol.1" in Figure 8.10. I think you have to has a reason implementation

/applications/accounting/entitydef/entitymodel.xml

<entity entity-name="PaymentBudgetAllocation"
            package-name="org.ofbiz.accounting.payment"
            title="Payment Budget Allocation Entity">
      <field name="budgetId" type="id-ne"></field>
      <field name="budgetItemSeqId" type="id-ne"></field>
      <field name="paymentId" type="id-ne"></field>
      <field name="amount" type="currency-amount"></field>
      <prim-key field="budgetId"/>
      <prim-key field="budgetItemSeqId"/>
      <prim-key field="paymentId"/>
      <relation type="one" fk-name="PAYMENT_BA_BDGT" rel-entity-name="Budget">
        <key-map field-name="budgetId"/>
      </relation>
 -    <relation type="one-nofk" rel-entity-name="BudgetItem">
+   <relation type="one" fk-name="PAYMENT_BUDGIT" rel-entity-name="BudgetItem">
        <key-map field-name="budgetId"/>
        <key-map field-name="budgetItemSeqId"/>
      </relation>
      <relation type="one" fk-name="PAYMENT_BA_PMT" rel-entity-name="Payment">
        <key-map field-name="paymentId"/>
      </relation>
    </entity>

and another question in the same figure in the book (Figure 8.10). In order_item has two attribute that is budgetId and budgetItemSeqId but you don't use it to link to budget_item entity, and I don't know why?

/applications/order/entitydef/entitymodel.xml

<entity entity-name="OrderItem"
            package-name="org.ofbiz.order.order"
            never-cache="true"
            title="Order Item Entity">
      <field name="orderId" type="id-ne"></field>
      <field name="orderItemSeqId" type="id-ne"></field>
      <field name="externalId" type="id"></field>
      <field name="orderItemTypeId" type="id-ne"></field>
      <field name="orderItemGroupSeqId" type="id-ne"></field>
      <field name="isItemGroupPrimary" type="indicator"></field>
      <field name="fromInventoryItemId" type="id"></field>
      <field name="budgetId" type="id"></field>
      <field name="budgetItemSeqId" type="id"></field>
      ...
+   <relation type="one" fk-name="ORDER_ITEM_BUDGET_ITEM" rel-entity-name="BudgetItem">
+      <key-map field-name="budgetId"/>
+       <key-map field-name="budgetItemSeqId"/>
+    </relation>


> Why PaymentBudgetAllocation's budgetid and budgetitemseqid was not foreing key for budgetitem
> ---------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-1845
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1845
>             Project: OFBiz
>          Issue Type: Bug
>          Components: accounting
>    Affects Versions: SVN trunk
>         Environment: /applications/accounting/entitydef/entitymodel.xml
>            Reporter: Tanakorn
>            Priority: Trivial
>             Fix For: SVN trunk
>
>
> I see you intent to make two of compound key (budgetId and budgetItemSeqId) have relation-type = nofk that not similar to "The Data Model Resource Book Vol.1" in Figure 8.10. I think you have to has a good reason for implementation
> /applications/accounting/entitydef/entitymodel.xml
> <entity entity-name="PaymentBudgetAllocation"
>             package-name="org.ofbiz.accounting.payment"
>             title="Payment Budget Allocation Entity">
>       <field name="budgetId" type="id-ne"></field>
>       <field name="budgetItemSeqId" type="id-ne"></field>
>       <field name="paymentId" type="id-ne"></field>
>       <field name="amount" type="currency-amount"></field>
>       <prim-key field="budgetId"/>
>       <prim-key field="budgetItemSeqId"/>
>       <prim-key field="paymentId"/>
>       <relation type="one" fk-name="PAYMENT_BA_BDGT" rel-entity-name="Budget">
>         <key-map field-name="budgetId"/>
>       </relation>
>  -    <relation type="one-nofk" rel-entity-name="BudgetItem">
> +   <relation type="one" fk-name="PAYMENT_BUDGIT" rel-entity-name="BudgetItem">
>         <key-map field-name="budgetId"/>
>         <key-map field-name="budgetItemSeqId"/>
>       </relation>
>       <relation type="one" fk-name="PAYMENT_BA_PMT" rel-entity-name="Payment">
>         <key-map field-name="paymentId"/>
>       </relation>
>     </entity>
> and another question in the same figure in the book (Figure 8.10). In order_item has two attribute that is budgetId and budgetItemSeqId but you don't use it to link to budget_item entity, and I don't know why?
> /applications/order/entitydef/entitymodel.xml
> <entity entity-name="OrderItem"
>             package-name="org.ofbiz.order.order"
>             never-cache="true"
>             title="Order Item Entity">
>       <field name="orderId" type="id-ne"></field>
>       <field name="orderItemSeqId" type="id-ne"></field>
>       <field name="externalId" type="id"></field>
>       <field name="orderItemTypeId" type="id-ne"></field>
>       <field name="orderItemGroupSeqId" type="id-ne"></field>
>       <field name="isItemGroupPrimary" type="indicator"></field>
>       <field name="fromInventoryItemId" type="id"></field>
>       <field name="budgetId" type="id"></field>
>       <field name="budgetItemSeqId" type="id"></field>
>       ...
> +   <relation type="one" fk-name="ORDER_ITEM_BUDGET_ITEM" rel-entity-name="BudgetItem">
> +      <key-map field-name="budgetId"/>
> +       <key-map field-name="budgetItemSeqId"/>
> +    </relation>

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

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-1845) Why PaymentBudgetAllocation's budgetid and budgetitemseqid was not foreing key for budgetitem

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-1845?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tanakorn updated OFBIZ-1845:
----------------------------

    Description:
I see you intent to make two of compound key (budgetId and budgetItemSeqId) of PaymentBudgetAllocation entity have relation-type = nofk that not similar to "The Data Model Resource Book Vol.1" in Figure 8.10. I think you have to has a good reason for implementation

/applications/accounting/entitydef/entitymodel.xml

<entity entity-name="PaymentBudgetAllocation"
            package-name="org.ofbiz.accounting.payment"
            title="Payment Budget Allocation Entity">
      <field name="budgetId" type="id-ne"></field>
      <field name="budgetItemSeqId" type="id-ne"></field>
      <field name="paymentId" type="id-ne"></field>
      <field name="amount" type="currency-amount"></field>
      <prim-key field="budgetId"/>
      <prim-key field="budgetItemSeqId"/>
      <prim-key field="paymentId"/>
      <relation type="one" fk-name="PAYMENT_BA_BDGT" rel-entity-name="Budget">
        <key-map field-name="budgetId"/>
      </relation>
 -    <relation type="one-nofk" rel-entity-name="BudgetItem">
+   <relation type="one" fk-name="PAYMENT_BUDGIT" rel-entity-name="BudgetItem">
        <key-map field-name="budgetId"/>
        <key-map field-name="budgetItemSeqId"/>
      </relation>
      <relation type="one" fk-name="PAYMENT_BA_PMT" rel-entity-name="Payment">
        <key-map field-name="paymentId"/>
      </relation>
    </entity>

and another question in the same figure in the book (Figure 8.10). In order_item entity has two attribute that is budgetId and budgetItemSeqId but you don't use it to link to budget_item entity, and I don't know why?

/applications/order/entitydef/entitymodel.xml

<entity entity-name="OrderItem"
            package-name="org.ofbiz.order.order"
            never-cache="true"
            title="Order Item Entity">
      <field name="orderId" type="id-ne"></field>
      <field name="orderItemSeqId" type="id-ne"></field>
      <field name="externalId" type="id"></field>
      <field name="orderItemTypeId" type="id-ne"></field>
      <field name="orderItemGroupSeqId" type="id-ne"></field>
      <field name="isItemGroupPrimary" type="indicator"></field>
      <field name="fromInventoryItemId" type="id"></field>
      <field name="budgetId" type="id"></field>
      <field name="budgetItemSeqId" type="id"></field>
      ...
+   <relation type="one" fk-name="ORDER_ITEM_BUDGET_ITEM" rel-entity-name="BudgetItem">
+      <key-map field-name="budgetId"/>
+       <key-map field-name="budgetItemSeqId"/>
+    </relation>

  was:
I see you intent to make two of compound key (budgetId and budgetItemSeqId) have relation-type = nofk that not similar to "The Data Model Resource Book Vol.1" in Figure 8.10. I think you have to has a good reason for implementation

/applications/accounting/entitydef/entitymodel.xml

<entity entity-name="PaymentBudgetAllocation"
            package-name="org.ofbiz.accounting.payment"
            title="Payment Budget Allocation Entity">
      <field name="budgetId" type="id-ne"></field>
      <field name="budgetItemSeqId" type="id-ne"></field>
      <field name="paymentId" type="id-ne"></field>
      <field name="amount" type="currency-amount"></field>
      <prim-key field="budgetId"/>
      <prim-key field="budgetItemSeqId"/>
      <prim-key field="paymentId"/>
      <relation type="one" fk-name="PAYMENT_BA_BDGT" rel-entity-name="Budget">
        <key-map field-name="budgetId"/>
      </relation>
 -    <relation type="one-nofk" rel-entity-name="BudgetItem">
+   <relation type="one" fk-name="PAYMENT_BUDGIT" rel-entity-name="BudgetItem">
        <key-map field-name="budgetId"/>
        <key-map field-name="budgetItemSeqId"/>
      </relation>
      <relation type="one" fk-name="PAYMENT_BA_PMT" rel-entity-name="Payment">
        <key-map field-name="paymentId"/>
      </relation>
    </entity>

and another question in the same figure in the book (Figure 8.10). In order_item has two attribute that is budgetId and budgetItemSeqId but you don't use it to link to budget_item entity, and I don't know why?

/applications/order/entitydef/entitymodel.xml

<entity entity-name="OrderItem"
            package-name="org.ofbiz.order.order"
            never-cache="true"
            title="Order Item Entity">
      <field name="orderId" type="id-ne"></field>
      <field name="orderItemSeqId" type="id-ne"></field>
      <field name="externalId" type="id"></field>
      <field name="orderItemTypeId" type="id-ne"></field>
      <field name="orderItemGroupSeqId" type="id-ne"></field>
      <field name="isItemGroupPrimary" type="indicator"></field>
      <field name="fromInventoryItemId" type="id"></field>
      <field name="budgetId" type="id"></field>
      <field name="budgetItemSeqId" type="id"></field>
      ...
+   <relation type="one" fk-name="ORDER_ITEM_BUDGET_ITEM" rel-entity-name="BudgetItem">
+      <key-map field-name="budgetId"/>
+       <key-map field-name="budgetItemSeqId"/>
+    </relation>


> Why PaymentBudgetAllocation's budgetid and budgetitemseqid was not foreing key for budgetitem
> ---------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-1845
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1845
>             Project: OFBiz
>          Issue Type: Bug
>          Components: accounting
>    Affects Versions: SVN trunk
>         Environment: /applications/accounting/entitydef/entitymodel.xml
>            Reporter: Tanakorn
>            Priority: Trivial
>             Fix For: SVN trunk
>
>
> I see you intent to make two of compound key (budgetId and budgetItemSeqId) of PaymentBudgetAllocation entity have relation-type = nofk that not similar to "The Data Model Resource Book Vol.1" in Figure 8.10. I think you have to has a good reason for implementation
> /applications/accounting/entitydef/entitymodel.xml
> <entity entity-name="PaymentBudgetAllocation"
>             package-name="org.ofbiz.accounting.payment"
>             title="Payment Budget Allocation Entity">
>       <field name="budgetId" type="id-ne"></field>
>       <field name="budgetItemSeqId" type="id-ne"></field>
>       <field name="paymentId" type="id-ne"></field>
>       <field name="amount" type="currency-amount"></field>
>       <prim-key field="budgetId"/>
>       <prim-key field="budgetItemSeqId"/>
>       <prim-key field="paymentId"/>
>       <relation type="one" fk-name="PAYMENT_BA_BDGT" rel-entity-name="Budget">
>         <key-map field-name="budgetId"/>
>       </relation>
>  -    <relation type="one-nofk" rel-entity-name="BudgetItem">
> +   <relation type="one" fk-name="PAYMENT_BUDGIT" rel-entity-name="BudgetItem">
>         <key-map field-name="budgetId"/>
>         <key-map field-name="budgetItemSeqId"/>
>       </relation>
>       <relation type="one" fk-name="PAYMENT_BA_PMT" rel-entity-name="Payment">
>         <key-map field-name="paymentId"/>
>       </relation>
>     </entity>
> and another question in the same figure in the book (Figure 8.10). In order_item entity has two attribute that is budgetId and budgetItemSeqId but you don't use it to link to budget_item entity, and I don't know why?
> /applications/order/entitydef/entitymodel.xml
> <entity entity-name="OrderItem"
>             package-name="org.ofbiz.order.order"
>             never-cache="true"
>             title="Order Item Entity">
>       <field name="orderId" type="id-ne"></field>
>       <field name="orderItemSeqId" type="id-ne"></field>
>       <field name="externalId" type="id"></field>
>       <field name="orderItemTypeId" type="id-ne"></field>
>       <field name="orderItemGroupSeqId" type="id-ne"></field>
>       <field name="isItemGroupPrimary" type="indicator"></field>
>       <field name="fromInventoryItemId" type="id"></field>
>       <field name="budgetId" type="id"></field>
>       <field name="budgetItemSeqId" type="id"></field>
>       ...
> +   <relation type="one" fk-name="ORDER_ITEM_BUDGET_ITEM" rel-entity-name="BudgetItem">
> +      <key-map field-name="budgetId"/>
> +       <key-map field-name="budgetItemSeqId"/>
> +    </relation>

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1845) Why PaymentBudgetAllocation's budgetid and budgetitemseqid was not foreing key for budgetitem

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-1845?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12613569#action_12613569 ]

Jacques Le Roux commented on OFBIZ-1845:
----------------------------------------

Should we not close this issue ?

> Why PaymentBudgetAllocation's budgetid and budgetitemseqid was not foreing key for budgetitem
> ---------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-1845
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1845
>             Project: OFBiz
>          Issue Type: Bug
>          Components: accounting
>    Affects Versions: SVN trunk
>         Environment: /applications/accounting/entitydef/entitymodel.xml
>            Reporter: Tanakorn
>            Priority: Trivial
>             Fix For: SVN trunk
>
>
> I see you intent to make two of compound key (budgetId and budgetItemSeqId) of PaymentBudgetAllocation entity have relation-type = nofk that not similar to "The Data Model Resource Book Vol.1" in Figure 8.10. I think you have to has a good reason for implementation
> /applications/accounting/entitydef/entitymodel.xml
> <entity entity-name="PaymentBudgetAllocation"
>             package-name="org.ofbiz.accounting.payment"
>             title="Payment Budget Allocation Entity">
>       <field name="budgetId" type="id-ne"></field>
>       <field name="budgetItemSeqId" type="id-ne"></field>
>       <field name="paymentId" type="id-ne"></field>
>       <field name="amount" type="currency-amount"></field>
>       <prim-key field="budgetId"/>
>       <prim-key field="budgetItemSeqId"/>
>       <prim-key field="paymentId"/>
>       <relation type="one" fk-name="PAYMENT_BA_BDGT" rel-entity-name="Budget">
>         <key-map field-name="budgetId"/>
>       </relation>
>  -    <relation type="one-nofk" rel-entity-name="BudgetItem">
> +   <relation type="one" fk-name="PAYMENT_BUDGIT" rel-entity-name="BudgetItem">
>         <key-map field-name="budgetId"/>
>         <key-map field-name="budgetItemSeqId"/>
>       </relation>
>       <relation type="one" fk-name="PAYMENT_BA_PMT" rel-entity-name="Payment">
>         <key-map field-name="paymentId"/>
>       </relation>
>     </entity>
> and another question in the same figure in the book (Figure 8.10). In order_item entity has two attribute that is budgetId and budgetItemSeqId but you don't use it to link to budget_item entity, and I don't know why?
> /applications/order/entitydef/entitymodel.xml
> <entity entity-name="OrderItem"
>             package-name="org.ofbiz.order.order"
>             never-cache="true"
>             title="Order Item Entity">
>       <field name="orderId" type="id-ne"></field>
>       <field name="orderItemSeqId" type="id-ne"></field>
>       <field name="externalId" type="id"></field>
>       <field name="orderItemTypeId" type="id-ne"></field>
>       <field name="orderItemGroupSeqId" type="id-ne"></field>
>       <field name="isItemGroupPrimary" type="indicator"></field>
>       <field name="fromInventoryItemId" type="id"></field>
>       <field name="budgetId" type="id"></field>
>       <field name="budgetItemSeqId" type="id"></field>
>       ...
> +   <relation type="one" fk-name="ORDER_ITEM_BUDGET_ITEM" rel-entity-name="BudgetItem">
> +      <key-map field-name="budgetId"/>
> +       <key-map field-name="budgetItemSeqId"/>
> +    </relation>

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

Reply | Threaded
Open this post in threaded view
|

[jira] Closed: (OFBIZ-1845) Why PaymentBudgetAllocation's budgetid and budgetitemseqid was not foreing key for budgetitem

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-1845?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux closed OFBIZ-1845.
----------------------------------

    Resolution: Invalid
      Assignee: Jacques Le Roux

This should have been better asked in user ML

http://docs.ofbiz.org/display/OFBADMIN/Mailing+Lists#MailingLists-DeveloperList:dev@...

> Why PaymentBudgetAllocation's budgetid and budgetitemseqid was not foreing key for budgetitem
> ---------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-1845
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1845
>             Project: OFBiz
>          Issue Type: Bug
>          Components: accounting
>    Affects Versions: SVN trunk
>         Environment: /applications/accounting/entitydef/entitymodel.xml
>            Reporter: Tanakorn
>            Assignee: Jacques Le Roux
>            Priority: Trivial
>             Fix For: SVN trunk
>
>
> I see you intent to make two of compound key (budgetId and budgetItemSeqId) of PaymentBudgetAllocation entity have relation-type = nofk that not similar to "The Data Model Resource Book Vol.1" in Figure 8.10. I think you have to has a good reason for implementation
> /applications/accounting/entitydef/entitymodel.xml
> <entity entity-name="PaymentBudgetAllocation"
>             package-name="org.ofbiz.accounting.payment"
>             title="Payment Budget Allocation Entity">
>       <field name="budgetId" type="id-ne"></field>
>       <field name="budgetItemSeqId" type="id-ne"></field>
>       <field name="paymentId" type="id-ne"></field>
>       <field name="amount" type="currency-amount"></field>
>       <prim-key field="budgetId"/>
>       <prim-key field="budgetItemSeqId"/>
>       <prim-key field="paymentId"/>
>       <relation type="one" fk-name="PAYMENT_BA_BDGT" rel-entity-name="Budget">
>         <key-map field-name="budgetId"/>
>       </relation>
>  -    <relation type="one-nofk" rel-entity-name="BudgetItem">
> +   <relation type="one" fk-name="PAYMENT_BUDGIT" rel-entity-name="BudgetItem">
>         <key-map field-name="budgetId"/>
>         <key-map field-name="budgetItemSeqId"/>
>       </relation>
>       <relation type="one" fk-name="PAYMENT_BA_PMT" rel-entity-name="Payment">
>         <key-map field-name="paymentId"/>
>       </relation>
>     </entity>
> and another question in the same figure in the book (Figure 8.10). In order_item entity has two attribute that is budgetId and budgetItemSeqId but you don't use it to link to budget_item entity, and I don't know why?
> /applications/order/entitydef/entitymodel.xml
> <entity entity-name="OrderItem"
>             package-name="org.ofbiz.order.order"
>             never-cache="true"
>             title="Order Item Entity">
>       <field name="orderId" type="id-ne"></field>
>       <field name="orderItemSeqId" type="id-ne"></field>
>       <field name="externalId" type="id"></field>
>       <field name="orderItemTypeId" type="id-ne"></field>
>       <field name="orderItemGroupSeqId" type="id-ne"></field>
>       <field name="isItemGroupPrimary" type="indicator"></field>
>       <field name="fromInventoryItemId" type="id"></field>
>       <field name="budgetId" type="id"></field>
>       <field name="budgetItemSeqId" type="id"></field>
>       ...
> +   <relation type="one" fk-name="ORDER_ITEM_BUDGET_ITEM" rel-entity-name="BudgetItem">
> +      <key-map field-name="budgetId"/>
> +       <key-map field-name="budgetItemSeqId"/>
> +    </relation>

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