?
avatar Didldu-Florian
Didldu-Florian
4 Jun 2020

DB Table #__user_usergroup_map has two cols user_id and group_id
One user can be added multiple, because of multiple groups, but user_id is set as primary key.

Steps to reproduce the issue

Try import a #__user_usergroup_map where a user is associated to more aus one usergroup

you will see it runs into duplicate entry error
Duplicate entry ... for key 'PRIMARY'

Expected result

Should be possible to import

Actual result

Error
Duplicate entry ... for key 'PRIMARY'
Because of PRIMARY Key user_id could only be exists once
Same foru group_id

System information (as much as possible)

Joomla! 4.0.0-beta1 Beta [ MaƱana ] 30-May-2020 18:32 GMT
Database Type | mysql 5.7.25-28

usergorupmap

avatar Didldu-Florian Didldu-Florian - open - 4 Jun 2020
avatar joomla-cms-bot joomla-cms-bot - change - 4 Jun 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 4 Jun 2020
avatar HLeithner HLeithner - change - 4 Jun 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-06-04 10:24:15
Closed_By HLeithner
avatar HLeithner
HLeithner - comment - 4 Jun 2020

The primary key uses 2 column that means the combination of both columns have to be unique which is correct.

It seams your import data has duplicated entries. ex. 2 rows with user_id: 1 and group_id: 1

avatar HLeithner HLeithner - close - 4 Jun 2020
avatar Didldu-Florian
Didldu-Florian - comment - 4 Jun 2020

You are right, thanks and sorry @HLeithner ?

Add a Comment

Login with GitHub to post a comment