Fix [1651899] - AD_Column: Avoid dup. SeqNo for IsIdentifier='Y'
https://sourceforge.net/tracker/?func=detail&atid=879335&aid=1651899&group_id=176962 Thanks to d_ruiz
This commit is contained in:
parent
beb64c217c
commit
9bcbe41b13
|
@ -213,6 +213,22 @@ public class MColumn extends X_AD_Column
|
||||||
WHERE AD_Table_ID IN (SELECT AD_Table_ID FROM AD_Table WHERE IsView='Y')
|
WHERE AD_Table_ID IN (SELECT AD_Table_ID FROM AD_Table WHERE IsView='Y')
|
||||||
**/
|
**/
|
||||||
|
|
||||||
|
/* Diego Ruiz - globalqss - BF [1651899] - AD_Column: Avoid dup. SeqNo for IsIdentifier='Y' */
|
||||||
|
if (isIdentifier())
|
||||||
|
{
|
||||||
|
int cnt = DB.getSQLValue(get_TrxName(),"SELECT COUNT(*) FROM AD_Column "+
|
||||||
|
"WHERE AD_Table_ID=?"+
|
||||||
|
" AND AD_Column_ID!=?"+
|
||||||
|
" AND IsIdentifier='Y'"+
|
||||||
|
" AND SeqNo=?",
|
||||||
|
new Object[] {getAD_Table_ID(), getAD_Column_ID(), getSeqNo()});
|
||||||
|
if (cnt>0)
|
||||||
|
{
|
||||||
|
log.saveError("SaveErrorNotUnique", Msg.getElement(getCtx(), COLUMNNAME_SeqNo));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Virtual Column
|
// Virtual Column
|
||||||
if (isVirtualColumn())
|
if (isVirtualColumn())
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue