Closed ghost closed 11 years ago
Good catch. Good approach is to add the pending filed. That way we're always sure of manipulating the right data
table: report_category
category_id | report_id | pending
=====================================
1 | 1 | 0
2 | 1 | 1
Updated Fix incident_id to Pending. That was what I meant to say actually
The
report_category
table holds the category data for both pending & fetched reports.The value for the
report_category.report_id
can be either:incidents._id
ifincidents.pending=1
incidents.incident_id
ifincidents.pending=0
if we have the following data:
Wouldn't the category data for both incidents be incorrect?