cancel
Showing results for 
Search instead for 
Did you mean: 

CDS Entity - Data not loaded into HDI containers

jiamin_seah
Explorer
0 Kudos

Hi Community,

I'm building a multitenant CAP app with node.js where data is being loaded from CSV files into HDI containers.

The following are part of the entities in my data model:

PA_SCHED is connected to PA_SCH_SEG via the Timeslots composition, and PA_SCH_SEG is connected back to PA_SCHED via the Schedule association backlink.

There is currently an issue where data is not loaded into PA_SCH_SEG caused by the PA_SCHED.Timeslots compositions or PA_SCH_SEG.Schedule association. When either one is removed, data gets loaded again into PA_SCH_SEG. There are also no errors thrown at the frontend/backend during the data load, but we see that the table in HANA DB is empty after that.

I have also tried changing the PA_SCH_SEG.Schedule association to a managed association as such:

With this change, data is loaded again into PA_SCH_SEG but it interferes with the out of the box create/update/delete operations as managed associations automatically introduces foreign keys. For example, a create operation fails with the following error message: SqlError: invalid column name: TIMESLOTS_SCHD_ID (TIMESLOTS_SCHD_ID is the automatically added foreign key).

Please let me know if you have any ideas/suggestions on this issue.

Thanks & regards,

Jia-Min

OlenaT
Advisor
Advisor
0 Kudos

Hi Jia-Min,

From you description it's not clear what kind of problem do you have, what are you expecting, what kind of data and how are you trying to load it. The same goes for the error response. Without knowing the request, it's not possible to answer what is failing. In your first modeling there is no foreign key created, so the tables are not connected to each other, which is not the kind of behaviour you would want by modeling "composition of". In the second case there will be a foreign key generated in PA_SCH_SEG. You can check the SQL statements sent to HANA by setting env variable DEBUG=hana.

Best regards,

Olena

Accepted Solutions (0)

Answers (0)