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
Hi,
I,m updating model with hasMany relation.
mysql query update relation example (id is AIPK)
DELETE FROM bibliography WHERE (item_id=13) AND (id<>NULL)
INSERT INTO bibliography (name, item_id, lock, created_at, updated_at, created_by, updated_by) VALUES ('anywhat', 13, 0, NOW(), NOW(), 1, 1)
But operator delete don't work correctly
explain DELETE FROM bibliography WHERE (item_id=13) AND (id<>NULL)
"id" "select_type" "table" "type" "possible_keys" "key" "key_len" "ref" "rows" "Extra"
"1" "SIMPLE" \N \N \N \N \N \N \N "Impossible WHERE"
row don't delete and insert duplicate entry with new PK
How to fix it?
Tnx
The text was updated successfully, but these errors were encountered:
Hi,
I,m updating model with hasMany relation.
mysql query update relation example (id is AIPK)
DELETE FROM
bibliography
WHERE (item_id
=13) AND (id
<>NULL)INSERT INTO
bibliography
(name
,item_id
,lock
,created_at
,updated_at
,created_by
,updated_by
) VALUES ('anywhat', 13, 0, NOW(), NOW(), 1, 1)But operator delete don't work correctly
explain DELETE FROM
bibliography
WHERE (item_id
=13) AND (id
<>NULL)"id" "select_type" "table" "type" "possible_keys" "key" "key_len" "ref" "rows" "Extra"
"1" "SIMPLE" \N \N \N \N \N \N \N "Impossible WHERE"
row don't delete and insert duplicate entry with new PK
How to fix it?
Tnx
The text was updated successfully, but these errors were encountered: