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
Hey folks!
I am trying to use upsertGraph to insert a row into my order table while creating a new order_item row and relating it to the order and also relating that order to an already existing product and requestor. The order_item table basically acts as a join table between the order and the product but has extra properties. The relates for product and requestor work just fine but the upsert does not create a new row in the order_item table for some reason. Here are the details:
The logs for inserted_order shows an empty array for items among other fetched values: { ..., items: [], ...}. There are no error messages and the order gets created successfully. Just the order_item does not. Could someone please tell me what I'm doing wrong?
The text was updated successfully, but these errors were encountered:
Hey folks!
I am trying to use upsertGraph to insert a row into my
order
table while creating a neworder_item
row and relating it to the order and also relating that order to an already existingproduct
andrequestor
. Theorder_item
table basically acts as a join table between the order and the product but has extra properties. The relates forproduct
andrequestor
work just fine but the upsert does not create a new row in theorder_item
table for some reason. Here are the details:Objection version:
^3.1.2
Base model Class:
Order Class:
Order Item Class:
Order Table DDL:
Order Item Table DDL:
Query:
The logs for
inserted_order
shows an empty array for items among other fetched values:{ ..., items: [], ...}
. There are no error messages and the order gets created successfully. Just the order_item does not. Could someone please tell me what I'm doing wrong?The text was updated successfully, but these errors were encountered: