Strange Database Error

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
Hubertus
Posts: 153
Joined: Sat Feb 11, 2006 2:11 pm
Location: Austria
Contact:

Strange Database Error

Post by Hubertus »

Hello,

I have two BO's Tour and Order with a 1:N relation. Since Orders are created first and the join to a Tour happens later on I use a process for joining and un-joining them. In some unreproducable situations it happens that the database table contains an Order twice ! This means that DISPO_TOUR_REF contains records with duplicate ID and RID values.
As I've sayed I have no idea where this comes from. Since this is a complete show stopper I'd be happy to give the users a quick fix.
What would happen if a specify a unique index in the database (MySQL 4.1 on Linux) covering these two fields ? Would AwareIM have a problem with this ?

Thanks a lot
Hubertus
aware_support2
Posts: 595
Joined: Sun Apr 24, 2005 2:22 am
Contact:

Post by aware_support2 »

Hi Hubertus,

When the user links two objects via a UI form, the system makes sure there are no duplicate links - even if the user tries to link the same objects twice. When you use INSERT action from a process, however, the system cannot detect duplicate links.

The solution is to add a condition to the INSERT rule in your process to check that the link does not already exist. Alternatively, instead of using INSERT action you can use assignment action:

Order.Tour = Tour

This should not cause problems even if executed multiple times.
Aware IM Support Team
Post Reply