4 Commits
0.5.6 ... 0.5.8

Author SHA1 Message Date
589cb7d579 Bump version
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2021-10-19 22:29:34 -05:00
3680ad1914 Fix back-fill on insert for Model.save 2021-10-19 22:29:15 -05:00
96e13d85fc Bump version
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2021-10-19 13:59:14 -05:00
5a9283ad85 orm(PostgreSQLDialect): double-quote column names in INSERT field lists 2021-10-19 13:59:00 -05:00
3 changed files with 3 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "@extollo/lib",
"version": "0.5.6",
"version": "0.5.8",
"description": "The framework library that lifts up your code.",
"main": "lib/index.js",
"types": "lib/index.d.ts",

View File

@@ -230,7 +230,7 @@ export class PostgreSQLDialect extends SQLDialect {
const table: string = tableString.split('.').map(x => `"${x}"`)
.join('.')
queryLines.push('INSERT INTO ' + (typeof source === 'string' ? table : `${table} AS "${source.alias}"`)
+ (columns.length ? ` (${columns.join(', ')})` : ''))
+ (columns.length ? ` (${columns.map(x => `"${x}"`).join(', ')})` : ''))
}
if ( Array.isArray(data) && !data.length ) {

View File

@@ -627,7 +627,7 @@ export abstract class Model<T extends Model<T>> extends AppClass implements Bus
const data = result.rows.first()
if ( data ) {
await this.assumeFromSource(result)
await this.assumeFromSource(data)
}
await this.dispatch(new ModelCreatedEvent<T>(this as any))