|
|
@ -101,7 +101,11 @@ function checkColumnRequired( |
|
|
|
return !fields || fields.includes(column.title); |
|
|
|
return !fields || fields.includes(column.title); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export function getColumnName(column: Column<any>, columns: Column[] = []) { |
|
|
|
export async function getColumnName( |
|
|
|
|
|
|
|
column: Column<any>, |
|
|
|
|
|
|
|
columns?: Column[] = [], |
|
|
|
|
|
|
|
) { |
|
|
|
|
|
|
|
columns = columns || (await Column.list({ fk_model_id: column.fk_model_id })); |
|
|
|
switch (column.uidt) { |
|
|
|
switch (column.uidt) { |
|
|
|
case UITypes.CreatedTime: { |
|
|
|
case UITypes.CreatedTime: { |
|
|
|
const createdTimeSystemCol = columns.find( |
|
|
|
const createdTimeSystemCol = columns.find( |
|
|
@ -2139,7 +2143,7 @@ class BaseModelSqlv2 { |
|
|
|
case UITypes.LastModifiedTime: |
|
|
|
case UITypes.LastModifiedTime: |
|
|
|
case UITypes.DateTime: |
|
|
|
case UITypes.DateTime: |
|
|
|
{ |
|
|
|
{ |
|
|
|
const columnName = getColumnName( |
|
|
|
const columnName = await getColumnName( |
|
|
|
column, |
|
|
|
column, |
|
|
|
await this.model.getColumns(), |
|
|
|
await this.model.getColumns(), |
|
|
|
); |
|
|
|
); |
|
|
|