[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

API Suggestion was: Re: Unique constraint on part numbers



Further:

This is a case where either program or API logic (preferably the latter) 
should prevent creation of a new item with the same partnumber, if another 
with that partnumber exists, and is listed as active.
Chris???

Problem: obsolete partnumber has a new version created which is not 
obsolete.  Someone attempts to unobsolete the original item.  Conflict 
happens.  Badness ensues.
Solution: the same programming constraint logic which prevents creation of 
a duplicate active partnumber, would prevent unobsoletion of a duplicate 
active partnumber.

Luke

 On Sun, 15 Jun 2008, 
woodvorg wrote:

> 
> Why is there no unique constraint on the partnumber field of parts? To me it
> doesn't seem right; a part number should be a unique identifier for each
> part.
> 
> Easy fix, I just altered the parts table with a unique constraint, but this
> produces nasty looking errors if you try to create a duplicate part.
> 

-- 
"Fiat money and sustainable society are not compatible." - Peter Cajander