IDEMPIERE-2513 Sequence Check not working for native sequences
This commit is contained in:
parent
d9098bd571
commit
9716fac80c
|
@ -21,6 +21,7 @@ import java.sql.ResultSet;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
|
import org.adempiere.exceptions.AdempiereException;
|
||||||
import org.compiere.Adempiere;
|
import org.compiere.Adempiere;
|
||||||
import org.compiere.model.MClient;
|
import org.compiere.model.MClient;
|
||||||
import org.compiere.model.MSequence;
|
import org.compiere.model.MSequence;
|
||||||
|
@ -79,6 +80,7 @@ public class SequenceCheck extends SvrProcess
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
s_log.log(Level.SEVERE, "validate", e);
|
s_log.log(Level.SEVERE, "validate", e);
|
||||||
|
throw new AdempiereException(e);
|
||||||
}
|
}
|
||||||
} // validate
|
} // validate
|
||||||
|
|
||||||
|
@ -124,6 +126,7 @@ public class SequenceCheck extends SvrProcess
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
s_log.log(Level.SEVERE, sql, e);
|
s_log.log(Level.SEVERE, sql, e);
|
||||||
|
throw new AdempiereException(e);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
|
@ -173,6 +176,7 @@ public class SequenceCheck extends SvrProcess
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
s_log.log (Level.SEVERE, sql, e);
|
s_log.log (Level.SEVERE, sql, e);
|
||||||
|
throw new AdempiereException(e);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
|
@ -233,6 +237,7 @@ public class SequenceCheck extends SvrProcess
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
s_log.log(Level.SEVERE, sql, e);
|
s_log.log(Level.SEVERE, sql, e);
|
||||||
|
throw new AdempiereException(e);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
|
|
|
@ -902,6 +902,7 @@ public class MSequence extends X_AD_Sequence
|
||||||
+ "FROM AD_Table t"
|
+ "FROM AD_Table t"
|
||||||
+ " INNER JOIN AD_Column c ON (t.AD_Table_ID=c.AD_Table_ID) "
|
+ " INNER JOIN AD_Column c ON (t.AD_Table_ID=c.AD_Table_ID) "
|
||||||
+ "WHERE t.TableName='" + tableName + "'"
|
+ "WHERE t.TableName='" + tableName + "'"
|
||||||
|
+ " AND t.IsView='N'" // ignore for views -- IDEMPIERE-2513
|
||||||
+ " AND c.ColumnName='" + tableName + "_ID'");
|
+ " AND c.ColumnName='" + tableName + "_ID'");
|
||||||
if (AD_Column_ID <= 0)
|
if (AD_Column_ID <= 0)
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Reference in New Issue