You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Patrick <pa...@gmail.com> on 2010/04/12 14:58:48 UTC
remove a foreign key dependency
When I place an order I want to remove the facility dependency, so I
commented out the following: and did a restart, but when I place an
order it still requires the dependency so I guess it didn't update.
Is there a special command to verify and update the DB from a modified
entitymodel.xml file ? Thanks
<entity entity-name="OrderHeader"
package-name="org.ofbiz.order.order"
never-cache="true"
title="Order Header Entity">
<!-- commented this out
<relation type="one" fk-name="ORDER_HDR_OFAC" title="Origin"
rel-entity-name="FacilityAndContactMechAndAddress1">
<key-map field-name="originFacilityId" rel-field-name="facilityId"/>
</relation>
-->
Re: remove a foreign key dependency
Posted by Patrick <pa...@gmail.com>.
I just used a SQL command in the webform to alter a table, that
worked. Thanks for your help. :)
On Mon, Apr 12, 2010 at 8:28 AM, Patrick <pa...@gmail.com> wrote:
> I ran a check, and it removed the dependency from webtools entity
> reference, eg. searching for ORDER_HDR_OFAC gives no results, but when
> I try to update an OrderHeader it still breaks saying INSERT on table
> 'ORDER_HEADER' caused a violation of foreign key constraint
> 'ORDER_HDR_OFAC' for key (10061) Do you have any suggestions ?
>
> On Mon, Apr 12, 2010 at 8:03 AM, Jacques Le Roux
> <ja...@les7arts.com> wrote:
>> Look for "Check/Update Database" in Webtools
>>
>> Jacques
>>
>> From: "Patrick" <pa...@gmail.com>
>>>
>>> When I place an order I want to remove the facility dependency, so I
>>> commented out the following: and did a restart, but when I place an
>>> order it still requires the dependency so I guess it didn't update.
>>> Is there a special command to verify and update the DB from a modified
>>> entitymodel.xml file ? Thanks
>>>
>>> <entity entity-name="OrderHeader"
>>> package-name="org.ofbiz.order.order"
>>> never-cache="true"
>>> title="Order Header Entity">
>>>
>>> <!-- commented this out
>>> <relation type="one" fk-name="ORDER_HDR_OFAC" title="Origin"
>>> rel-entity-name="FacilityAndContactMechAndAddress1">
>>> <key-map field-name="originFacilityId" rel-field-name="facilityId"/>
>>> </relation>
>>> -->
>>>
>>
>>
>
Re: remove a foreign key dependency
Posted by Patrick <pa...@gmail.com>.
I ran a check, and it removed the dependency from webtools entity
reference, eg. searching for ORDER_HDR_OFAC gives no results, but when
I try to update an OrderHeader it still breaks saying INSERT on table
'ORDER_HEADER' caused a violation of foreign key constraint
'ORDER_HDR_OFAC' for key (10061) Do you have any suggestions ?
On Mon, Apr 12, 2010 at 8:03 AM, Jacques Le Roux
<ja...@les7arts.com> wrote:
> Look for "Check/Update Database" in Webtools
>
> Jacques
>
> From: "Patrick" <pa...@gmail.com>
>>
>> When I place an order I want to remove the facility dependency, so I
>> commented out the following: and did a restart, but when I place an
>> order it still requires the dependency so I guess it didn't update.
>> Is there a special command to verify and update the DB from a modified
>> entitymodel.xml file ? Thanks
>>
>> <entity entity-name="OrderHeader"
>> package-name="org.ofbiz.order.order"
>> never-cache="true"
>> title="Order Header Entity">
>>
>> <!-- commented this out
>> <relation type="one" fk-name="ORDER_HDR_OFAC" title="Origin"
>> rel-entity-name="FacilityAndContactMechAndAddress1">
>> <key-map field-name="originFacilityId" rel-field-name="facilityId"/>
>> </relation>
>> -->
>>
>
>
Re: remove a foreign key dependency
Posted by Jacques Le Roux <ja...@les7arts.com>.
Look for "Check/Update Database" in Webtools
Jacques
From: "Patrick" <pa...@gmail.com>
> When I place an order I want to remove the facility dependency, so I
> commented out the following: and did a restart, but when I place an
> order it still requires the dependency so I guess it didn't update.
> Is there a special command to verify and update the DB from a modified
> entitymodel.xml file ? Thanks
>
> <entity entity-name="OrderHeader"
> package-name="org.ofbiz.order.order"
> never-cache="true"
> title="Order Header Entity">
>
> <!-- commented this out
> <relation type="one" fk-name="ORDER_HDR_OFAC" title="Origin"
> rel-entity-name="FacilityAndContactMechAndAddress1">
> <key-map field-name="originFacilityId" rel-field-name="facilityId"/>
> </relation>
> -->
>