cds-dbm icon indicating copy to clipboard operation
cds-dbm copied to clipboard

Delta data load generates wrong SELECT statement

Open sedacrivity opened this issue 2 years ago • 1 comments

Hi,

I am trying to upload a CSV data for a table which is defined like

entity UsersCompanies: ca.active, managed { key user: Association to one UsersInfo; key company: Association to one Companies; }

When doing a full load everything works fine. When doing a delta load then an error is thrown

error: column "company" does not exist

The SQL statement generated is

STATEMENT: SELECT activeIs AS "activeIs", createdAt AS "createdAt", createdBy AS "createdBy", modifiedAt AS "modifiedAt", modifiedBy AS "modifiedBy", user_ID AS "user_ID", company_code AS "company_code" FROM UsersCompanies ALIAS_1 WHERE user = $1 AND company = $2 LIMIT 1 which indeed has the where clause fields incorrectly defined.

It seems the associations are not correctly resolved into the proper 'company_code' and 'user_ID' fields.

sedacrivity avatar Apr 22 '22 16:04 sedacrivity

news?

luizcarlospedrosogomes avatar Nov 18 '22 23:11 luizcarlospedrosogomes