You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 14, 2023. It is now read-only.
In the branch gregorwolf:feature/draft-support I've added a new entity in the service which I've annotated with @odata.draft.enabled unfortuantely already the first simple READ / GET request to the entity fails with this error:
nsole.error
[2020-09-29T20:18:44.234Z | ERROR | 1310454]: Error stacktrace: error: syntax error at or near "." at Parser.parseErrorMessage (/home/gwolf/projects/cds-pg/node_modules/pg-protocol/src/parser.ts:357:11) at Parser.handlePacket (/home/gwolf/projects/cds-pg/node_modules/pg-protocol/src/parser.ts:186:21) at Parser.parse (/home/gwolf/projects/cds-pg/node_modules/pg-protocol/src/parser.ts:101:30) at Socket. (/home/gwolf/projects/cds-pg/node_modules/pg-protocol/src/index.ts:7:48) at Socket.emit (events.js:315:20) at addChunk (_stream_readable.js:295:12) at readableAddChunk (_stream_readable.js:271:9) at Socket.Readable.push (_stream_readable.js:212:10) at TCP.onStreamRead (internal/stream_base_commons.js:186:23)
The generated SQL is:
SELECT active AS "active" .ID AS "ID" , active AS "active" .type_Boolean AS "type_Boolean" , active AS "active" .type_Int32 AS "type_Int32" , active AS "active" .type_Int64 AS "type_Int64" , active AS "active" .type_Decimal AS "type_Decimal" , active AS "active" .type_Double AS "type_Double" , active AS "active" .type_Date AS "type_Date" , active AS "active" .type_Time AS "type_Time" , active AS "active" .type_DateTime AS "type_DateTime" , active AS "active" .type_Timestamp AS "type_Timestamp" , active AS "active" .type_String AS "type_String" , active AS "active" .type_Binary AS "type_Binary" , active AS "active" .type_LargeBinary AS "type_LargeBinary" , active AS "active" .type_LargeString AS "type_LargeString" , true AS "IsActiveEntity", false AS "HasActiveEntity", null AS "DraftAdministrativeData_DraftUUID", CASE WHEN DRAFTS.DRAFTADMINISTRATIVEDATA_DRAFTUUID IS NOT NULL THEN TRUE ELSE FALSE END AS "HasDraftEntity" FROM BeershopService_TypeChecksWithDraft active LEFT JOIN BeershopService_TypeChecksWithDraft_drafts drafts ON active.ID = drafts.ID ORDER BY active.ID ASC LIMIT 1000
Looks like the "active AS " which is added to every column must be removed. Also the space betwen i.e. "active" .ID must be removed. "active".ID should work.
The generated SQL for sqlite is:
SELECT active.ID, active.type_Boolean, active.type_Int32, active.type_Int64, active.type_Decimal, active.type_Double, active.type_Date, active.type_Time, active.type_DateTime, active.type_Timestamp, active.type_String, active.type_Binary, active.type_LargeBinary, active.type_LargeString, true AS "IsActiveEntity", false AS "HasActiveEntity", null AS "DraftAdministrativeData_DraftUUID", CASE WHEN DRAFTS.DRAFTADMINISTRATIVEDATA_DRAFTUUID IS NOT NULL THEN TRUE ELSE FALSE END AS "HasDraftEntity" FROM BeershopService_TypeChecksWithDraft active LEFT JOIN BeershopService_TypeChecksWithDraft_drafts drafts ON active.ID = drafts.ID ORDER BY active.ID COLLATE NOCASE ASC LIMIT 1000
The text was updated successfully, but these errors were encountered:
The value of cqn.INSERT.into that is: 'BeershopAdminService.Breweries_drafts' is not found in the model.definitions. It returns an undefined. So maybe adding a check here can provide a first workaround.
Quite some progress with draft support today. The read doesn't cause an exit anymore. PR #50 containes the adjustments I've made so far. @mikezaschka do you see a way that we can create the fields in table BeershopService_TypeChecksWithDraft_drafts respecting CASE? See my comment here.
In the branch gregorwolf:feature/draft-support I've added a new entity in the service which I've annotated with @odata.draft.enabled unfortuantely already the first simple READ / GET request to the entity fails with this error:
The generated SQL is:
Looks like the "active AS " which is added to every column must be removed. Also the space betwen i.e. "active" .ID must be removed. "active".ID should work.
The generated SQL for sqlite is:
The text was updated successfully, but these errors were encountered: