mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-18 13:10:44 +00:00
fix setValueIfTableHasField - should catch if field isn't found (helps tables w/o createDate work)
This commit is contained in:
@ -167,6 +167,8 @@ public abstract class AbstractRDBMSAction implements QActionInterface
|
|||||||
** given record.
|
** given record.
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
protected void setValueIfTableHasField(QRecord record, QTableMetaData table, String fieldName, Serializable value)
|
protected void setValueIfTableHasField(QRecord record, QTableMetaData table, String fieldName, Serializable value)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
QFieldMetaData field = table.getField(fieldName);
|
QFieldMetaData field = table.getField(fieldName);
|
||||||
if(field != null)
|
if(field != null)
|
||||||
@ -174,6 +176,13 @@ public abstract class AbstractRDBMSAction implements QActionInterface
|
|||||||
record.setValue(fieldName, value);
|
record.setValue(fieldName, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch(Exception e)
|
||||||
|
{
|
||||||
|
/////////////////////////////////////////////////
|
||||||
|
// this means field doesn't exist, so, ignore. //
|
||||||
|
/////////////////////////////////////////////////
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user