-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Closed
Labels
accepting PRsbugcomplexity: lowdriver: sap hanasize-xsTrivial tasks or quick fixes. Estimated effort: Less than 1 hourTrivial tasks or quick fixes. Estimated effort: Less than 1 hour
Description
Issue Description
With an entity using @column("simple-array") the creation statement will fail in SAP HANA.
Expected Behavior
Creation statement works, arrays in a single string work as well
Actual Behavior
Error: sql syntax error: incorrect syntax near "text": line 1 col 511 (at pos 511)
2020-10-28T14:43:40.591+0000 [APP/PROC/WEB/0] OUT at /home/vcap/app/node_modules/typeorm/driver/sap/SapQueryRunner.js (/home/vcap/app/node_modules/typeorm/driver/sap/SapQueryRunner.js:183:74)
2020-10-28T14:43:40.591+0000 [APP/PROC/WEB/0] OUT at /home/vcap/app/node_modules/typeorm/node_modules/tslib/tslib.js.step (/home/vcap/app/node_modules/typeorm/node_modules/tslib/tslib.js:141:27)
2020-10-28T14:43:40.591+0000 [APP/PROC/WEB/0] OUT at /home/vcap/app/node_modules/typeorm/node_modules/tslib/tslib.js (/home/vcap/app/node_modules/typeorm/node_modules/tslib/tslib.js:122:57)
2020-10-28T14:43:40.591+0000 [APP/PROC/WEB/0] OUT at /home/vcap/app/node_modules/typeorm/node_modules/tslib/tslib.js.fulfilled (/home/vcap/app/node_modules/typeorm/node_modules/tslib/tslib.js:112:62)
Steps to Reproduce
@Entity()
export class AwesomeEntity {
@PrimaryColumn()
id: string;
@Column("simple-array")
myField: string[] = [];
constructor(data: Partial<AwesomeEntity>) {
Object.assign(this, data);
}
}My Environment
I'm using nestjs.
| Dependency | Version |
|---|---|
| Operating System | MacOS 10.14.6 (18G6032) |
| Node.js version | v10.20.1 |
| Typescript version | typescript@3.9.7 |
| TypeORM version | typeorm@0.2.25 |
(I've checked the latest version of typeorm as well)
Additional Context
Issue seems to be here
typeorm/src/driver/sap/SapDriver.ts
Line 447 in a5eb946
| return "text"; |
Relevant Database Driver(s)
-
aurora-data-api -
aurora-data-api-pg -
better-sqlite3 -
cockroachdb -
cordova -
expo -
mongodb -
mysql -
nativescript -
oracle -
postgres -
react-native -
sap -
sqlite -
sqlite-abstract -
sqljs -
sqlserver
Are you willing to resolve this issue by submitting a Pull Request?
- Yes, I have the time, and I know how to start.
- Yes, I have the time, but I don't know how to start. I would need guidance.
- No, I don't have the time, although I believe I could do it if I had the time...
- No, I don't have the time and I wouldn't even know how to start.
I can try, I think I know where the issue is, but I'm not familiar with how internally the project works, specially regarding build and testing.
Metadata
Metadata
Assignees
Labels
accepting PRsbugcomplexity: lowdriver: sap hanasize-xsTrivial tasks or quick fixes. Estimated effort: Less than 1 hourTrivial tasks or quick fixes. Estimated effort: Less than 1 hour