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
Strange Database Error
-
- Posts: 595
- Joined: Sun Apr 24, 2005 2:22 am
- Contact:
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.
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