cascading deletes in ofbiz

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

cascading deletes in ofbiz

Heidi Dehaes - Olagos
Hello,

Is it possible in any or other way to set the ofbiz 14.12 (mysql or
postgress) database ready for cascading deletes in a simple way?

For example in the case i want to delete a product_id in the PRODUCT table.

Regards,
Eric

Olagos bvba
Heidi Dehaes
Kerkstraat 34
2570 Duffel
Belgium
Tel. :     015/31 53 04
GSM :    0485/22 35 80
E-mail : [hidden email]
http://www.olagos.eu
http://www.olagos.com
http://www.olagos.be
http://www.olagos.nl
Reply | Threaded
Open this post in threaded view
|

Re: cascading deletes in ofbiz

Jacques Le Roux
Administrator
This is what I was up to so far https://cwiki.apache.org/confluence/display/OFBENDUSER/How+to+delete+tuples+added+to+test+a+setup
It's manual and concerns only order, so you would need to do the same research for product
There is no automation OOTB for that. It's even disputable as Scott's comment shows.

Jacques

Le 22/02/2016 01:13, Heidi Dehaes - Olagos a écrit :

> Hello,
>
> Is it possible in any or other way to set the ofbiz 14.12 (mysql or
> postgress) database ready for cascading deletes in a simple way?
>
> For example in the case i want to delete a product_id in the PRODUCT table.
>
> Regards,
> Eric
>
> Olagos bvba
> Heidi Dehaes
> Kerkstraat 34
> 2570 Duffel
> Belgium
> Tel. :     015/31 53 04
> GSM :    0485/22 35 80
> E-mail : [hidden email]
> http://www.olagos.eu
> http://www.olagos.com
> http://www.olagos.be
> http://www.olagos.nl
>
Reply | Threaded
Open this post in threaded view
|

Re: cascading deletes in ofbiz

taher
Hi Eric,

In addition to what Jacques put neatly below, I would add that the OFBiz
data model is complex and highly interconnected. And something central like
a product is pretty much connected to everything, so a delete might cascade
(more or less) the entire database.

I would also highly recommend avoiding tweaking your databases for business
logic reasons and to stay independent of any database vendor. Instead, just
create a delete service for each delete operation that cascades to the
limit you need. For example you might want to delete invoices but not GL
transactions.

Also, generally speaking, most modern systems that I know of avoid delete
altogether, and instead just disable or make things "inactive" for
reporting or operational reasons. That is always a safer and more auditable
system.

My 2 cents

Taher Alkhateeb

On Mon, Feb 22, 2016 at 12:41 PM, Jacques Le Roux <
[hidden email]> wrote:

> This is what I was up to so far
> https://cwiki.apache.org/confluence/display/OFBENDUSER/How+to+delete+tuples+added+to+test+a+setup
> It's manual and concerns only order, so you would need to do the same
> research for product
> There is no automation OOTB for that. It's even disputable as Scott's
> comment shows.
>
> Jacques
>
> Le 22/02/2016 01:13, Heidi Dehaes - Olagos a écrit :
>
>> Hello,
>>
>> Is it possible in any or other way to set the ofbiz 14.12 (mysql or
>> postgress) database ready for cascading deletes in a simple way?
>>
>> For example in the case i want to delete a product_id in the PRODUCT
>> table.
>>
>> Regards,
>> Eric
>>
>> Olagos bvba
>> Heidi Dehaes
>> Kerkstraat 34
>> 2570 Duffel
>> Belgium
>> Tel. :     015/31 53 04
>> GSM :    0485/22 35 80
>> E-mail : [hidden email]
>> http://www.olagos.eu
>> http://www.olagos.com
>> http://www.olagos.be
>> http://www.olagos.nl
>>
>>
Reply | Threaded
Open this post in threaded view
|

Re: cascading deletes in ofbiz

Julien NICOLAS
I agree with Taher, It could be very dangerous and difficult to
understand 'what's happens' after a product deletion...

Julien.

Le 22/02/2016 11:38, Taher Alkhateeb a écrit :
> Also, generally speaking, most modern systems that I know of avoid delete
> altogether, and instead just disable or make things "inactive" for
> reporting or operational reasons. That is always a safer and more auditable
> system.

Reply | Threaded
Open this post in threaded view
|

Re: cascading deletes in ofbiz

Heidi Dehaes - Olagos
Ok Taher and Julien,
I will follow your advice to create services for specific deletions.

That 's a better idea.

Thanks for your advice,
Eric

Olagos bvba
Heidi Dehaes
Kerkstraat 34
2570 Duffel
Belgium
Tel. :     015/31 53 04
GSM :    0485/22 35 80
E-mail : [hidden email]
http://www.olagos.eu
http://www.olagos.com
http://www.olagos.be
http://www.olagos.nl



2016-02-22 12:03 GMT+01:00 Julien NICOLAS <[hidden email]>:

> I agree with Taher, It could be very dangerous and difficult to understand
> 'what's happens' after a product deletion...
>
> Julien.
>
>
> Le 22/02/2016 11:38, Taher Alkhateeb a écrit :
>
>> Also, generally speaking, most modern systems that I know of avoid delete
>> altogether, and instead just disable or make things "inactive" for
>> reporting or operational reasons. That is always a safer and more
>> auditable
>> system.
>>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: cascading deletes in ofbiz

Jacques Le Roux
Administrator
In reply to this post by taher
BTW I already answered on the user ML one year ago. We would have that as an option, see http://markmail.org/message/nr4i7wcblof6shtm

I will add a link in the wiki to this last message.

Jacques

Le 22/02/2016 11:38, Taher Alkhateeb a écrit :

> Hi Eric,
>
> In addition to what Jacques put neatly below, I would add that the OFBiz
> data model is complex and highly interconnected. And something central like
> a product is pretty much connected to everything, so a delete might cascade
> (more or less) the entire database.
>
> I would also highly recommend avoiding tweaking your databases for business
> logic reasons and to stay independent of any database vendor. Instead, just
> create a delete service for each delete operation that cascades to the
> limit you need. For example you might want to delete invoices but not GL
> transactions.
>
> Also, generally speaking, most modern systems that I know of avoid delete
> altogether, and instead just disable or make things "inactive" for
> reporting or operational reasons. That is always a safer and more auditable
> system.
>
> My 2 cents
>
> Taher Alkhateeb
>
> On Mon, Feb 22, 2016 at 12:41 PM, Jacques Le Roux <
> [hidden email]> wrote:
>
>> This is what I was up to so far
>> https://cwiki.apache.org/confluence/display/OFBENDUSER/How+to+delete+tuples+added+to+test+a+setup
>> It's manual and concerns only order, so you would need to do the same
>> research for product
>> There is no automation OOTB for that. It's even disputable as Scott's
>> comment shows.
>>
>> Jacques
>>
>> Le 22/02/2016 01:13, Heidi Dehaes - Olagos a écrit :
>>
>>> Hello,
>>>
>>> Is it possible in any or other way to set the ofbiz 14.12 (mysql or
>>> postgress) database ready for cascading deletes in a simple way?
>>>
>>> For example in the case i want to delete a product_id in the PRODUCT
>>> table.
>>>
>>> Regards,
>>> Eric
>>>
>>> Olagos bvba
>>> Heidi Dehaes
>>> Kerkstraat 34
>>> 2570 Duffel
>>> Belgium
>>> Tel. :     015/31 53 04
>>> GSM :    0485/22 35 80
>>> E-mail : [hidden email]
>>> http://www.olagos.eu
>>> http://www.olagos.com
>>> http://www.olagos.be
>>> http://www.olagos.nl
>>>
>>>