I have a table that has no primary key… it is a cross-ref table with some extra data stored in it.
I’d prefer not to use a primary key because the size of this table will grow so rapidly that I’m afraid, over time, I will exceed the sequence.
When I create a new row in the table, and persist it, it works fine.
When I try to update the same row, it throws an error:
Unknown column 'id' in 'where clause': UPDATE order_details SET `order_id` = 5, `quantity` = 2, `item_id` = 1, `internal_cost_at_sale` = NULL, `customer_price_at_sale` = NULL WHERE id = NULL
Of course id is an unknown column… it’s not even supposed to be doing anything with it. Is there some way I can tell this not to do what it’s doing?