我正在使用XAMPP,当我尝试通过双击该行来编辑产品时,它会给我一个错误:This table does not contain a unique column. Features related to the grid edit, checkbox, Edit, Copy and Delete links may not work after saving.
我的表中确实有一个独特的自动增量列,这是我的表模式(来自sql转储):
CREATE TABLE `productAttributes` (
`id` bigint(11) NOT NULL,
`productId` bigint(11) NOT NULL,
`attributeValueId1` bigint(11) DEFAULT NULL,
`attributeValueId2` bigint(11) DEFAULT NULL,
`characteristics_en` text
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
ALTER TABLE `productAttributes`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `id_2` (`id`),
ADD KEY `id` (`id`);
ALTER TABLE `productAttributes`
MODIFY `id` bigint(11) NOT NULL AUTO_INCREMENT;
那么即使我的表有唯一列,它为什么会出现此错误?