Update sql statements don't correspond to request.form action=edit request
Update sql statements don't correspond to request.form action=edit request
Env: .net, C#, Oracle, LeftJoin Model on 2 tables.
Why is the second update statement missing on changes to equ_quantity fields?
------Debug Info on changing equi_quantity value
request.form
{action=edit
&data[row_1][re][requ_equipment_id]=1_
&data[row_1][ee][equi_quantity]=13}
response Queries
--"SELECT *
FROM ref_equipment re
WHERE re.requ_equipment_id = :where_0 "
--"UPDATE ref_equipment re
SET requ_equipment_id = :requ_equipment_id (missing set for equi_quantity)***
WHERE re.requ_equipment_id = :where_0 "
// Expected an update statement here for the equi_quantity field.
--"SELECT re.requ_equipment_id as \"re.requ_equipment_id\",
re.requ_nomenclature as \"re.requ_nomenclature\",
re.requ_specialty as \"re.requ_specialty\",
re.requ_provided_by as \"re.requ_provided_by\",
re.requ_notes as \"re.requ_notes\",
re.requ_enabled as \"re.requ_enabled\",
ee.equi_quantity as \"ee.equi_quantity\",
ee.equi_requ_equipment_id as \"ee.equi_requ_equipment_id\",
ee.equi_ref_id as \"ee.equi_ref_id\", ee.equi_id as \"ee.equi_id\"
FROM ref_equipment re
LEFT JOIN es_equipment ee
ON re.requ_equipment_id = ee.equi_requ_equipment_id
WHERE re.requ_equipment_id = :where_0 "
Answers
Can you show me both your Javascript code (for the DataTable and Editor) and the .NET code that you are using for the Editor please? I fear that this is an issue with the Editor / Oracle integration, but I'd like to make sure. It should actually write to the joined table, but I think it will throw an error due to the differently named primary key.
Allan
Had to use aliases for table names because of Oracle 32char identifier limit.
JavaScript-----------
.NET code---------------------
Model<JoinEsEquip>--------------------------
ee.equi_requ_equipment_id
is the primary key for the joined table? If so, you need to include that in thefield
list - typically as ahidden
field type.Allan