0

I try to integrate already implemented SAPUI5 application with CAP in order to use SQLite database. In my models I have a property called Order and as you may know, Order is a reserved keyword in SQLite.

entity MyEntity{
  key ID : Integer;
  Name: localized String(111);
  Order: Integer;
}

When I try to use the following command to generate the database:

cds deploy --to sqlite:db/mydb.db

I get the syntax error:

[ERROR] SQLITE_ERROR: near "Order": syntax error

When I use the quotation in my defined entity, then I get an error which regards to SAP HANA database:

[ERROR] cds compile failed due to these errors...
 at db\schema.cds:23:3-10: Quoted identifiers are not allowed in plain mode of toHana: "Order"

I just wanted to know is there anyway to solve the issue?

PS: I do not want to use HANA database, so please let me know if there is anyway to disable it, because I could not find any information in this regards.

I appreciate any help or advice :)

Boghyon Hoffmann
  • 17,103
  • 12
  • 72
  • 170
Babak Hashemi
  • 327
  • 3
  • 11

1 Answers1

0

In the package.json of your application's root folder, you might have mentioned HANA as the productive DB 'kind'. Try changing it to SQLite.

krisho
  • 1,004
  • 7
  • 26
  • No it's sqlite. I guess because they actually believe we should use HANA in production, by default it also check the HANA compatibility. I see such a different behaviors also in Node.js OData version. – Babak Hashemi Mar 02 '20 at 08:37