Insert with joins - Field list requirements

Insert with joins - Field list requirements

mboscombosco Posts: 3Questions: 2Answers: 0
edited March 2021 in Free community support

Hi,

I'm am trying to have CRUD operations on left joined tables. While editing the joined tables works, I noticed that there are issues with Add/Delete. I am currently working with two tables that both have an idx (primary key) that I use for the join (TBL1.id = TBL2.idx). I was wondering if the field list that we supply before left joining can include all the fields including these ids or if there is a restriction? I ask because, based on the debugging it currently seems like the the idx column is appended to the end of the insert statement like so:

Here's how I call them on the server side
var response = new Editor(db,dbTable,primaryKeys).Field(fieldList) .LeftJoin(dbJoinTable,col2Name,"=", col1Name).Process(request).Data();

where the **fieldList **has all the fields from both the tables.

Since I also assume that datatables will allow us to insert into both the joined tables as part of the insert operation, please let me know if I am wrong.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,226Questions: 1Answers: 10,416 Site admin
    Answer ✓

    The direction we've gone with this in Editor is to allow nested editing - so the left joined table can be effectively edited inside the host table. See this example.

    I'm afraid that no, at the moment the .NET libraries do not allow for submitting new data for a joined row as part of the same form as the host.

    Allan

This discussion has been closed.