IDEMPIERE-5254 - AD create postgres sequences and ad_sequence for views (#1293)
* IDEMPIERE-5254 - AD create postgres sequences and ad_sequence for views * IDEMPIERE-5254 - adjusting !isView condition
This commit is contained in:
parent
c13039cf82
commit
41c3e115b1
|
@ -721,13 +721,15 @@ public class MTable extends X_AD_Table implements ImmutablePOSupport
|
||||||
if (!success)
|
if (!success)
|
||||||
return success;
|
return success;
|
||||||
// Sync Table ID
|
// Sync Table ID
|
||||||
MSequence seq = MSequence.get(getCtx(), getTableName(), get_TrxName());
|
if(!isView()) {
|
||||||
if (seq == null || seq.get_ID() == 0)
|
MSequence seq = MSequence.get(getCtx(), getTableName(), get_TrxName());
|
||||||
MSequence.createTableSequence(getCtx(), getTableName(), get_TrxName());
|
if (seq == null || seq.get_ID() == 0)
|
||||||
else if (!seq.getName().equals(getTableName()))
|
MSequence.createTableSequence(getCtx(), getTableName(), get_TrxName());
|
||||||
{
|
else if (!seq.getName().equals(getTableName()))
|
||||||
seq.setName(getTableName());
|
{
|
||||||
seq.saveEx();
|
seq.setName(getTableName());
|
||||||
|
seq.saveEx();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (newRecord || is_ValueChanged(COLUMNNAME_IsChangeLog)) {
|
if (newRecord || is_ValueChanged(COLUMNNAME_IsChangeLog)) {
|
||||||
MChangeLog.resetLoggedList();
|
MChangeLog.resetLoggedList();
|
||||||
|
|
Loading…
Reference in New Issue