I've deleted by the WebUI a Several Network Devices on class NetworkDevices and when i push again the new device with the same name by my API python script i've a MySQL Error 1062:
Error: Failed to issue SQL query: query = INSERT INTO networkdevice (id,networkdevicetype_id,iosversion_id,ram) VALUES (21286, 108, 803, 'N/A'), mysql_errno = 1062, mysql_error = Duplicate entry '21286' for key 'PRIMARY'
however there are no duplicates in MySQL/phpmyadmin:
SELECT * FROM functionalci WHERE id = '21286'
Hello,
One object can be persisted in multiple classes... You do not give much details on how you did delete the object sin the first place ? But the error you're getting can be caused by records still presents in some of the class hierarchy tables.
Combodo made this free extension that can detect such inconsistencies, try it out : https://store.itophub.io/en_US/products/combodo-db-tools
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I've deleted by the WebUI a Several Network Devices on class NetworkDevices and when i push again the new device with the same name by my API python script i've a MySQL Error 1062:
Error: Failed to issue SQL query: query = INSERT INTO
networkdevice
(id
,networkdevicetype_id
,iosversion_id
,ram
) VALUES (21286, 108, 803, 'N/A'), mysql_errno = 1062, mysql_error = Duplicate entry '21286' for key 'PRIMARY'however there are no duplicates in MySQL/phpmyadmin:
SELECT * FROM
functionalci
WHEREid
= '21286'21286 XXXX-XXXX-XX_member_Switch 1 1 low NULL NetworkDevice NULL N/A
there is just one entry like above.
Thanks for your responses.
Remi.
Hello,
One object can be persisted in multiple classes... You do not give much details on how you did delete the object sin the first place ? But the error you're getting can be caused by records still presents in some of the class hierarchy tables.
Combodo made this free extension that can detect such inconsistencies, try it out :
https://store.itophub.io/en_US/products/combodo-db-tools