Hello Dmytro.
Thanks for your answer, but it continues tofail.
We have 3 classes:
1) User Account --> Accounts table, with this design:Acoount ID
ID (this is the attribute that is related to the group relational table)...
2) Groups --> Groups table, with this design:Group_ID3) User Groups--> Accounts-Groups relationship table, with this design:User_IDGroup_ID
User Account:
Groups:
Error:
2022-11-29 09:58:55,417 593775465 [ApacheDS Worker-thread-117] (com.ca.jcs.core:com.ca.jcs.processor.RetryOpProcessorProxy:343) DEBUG - com.ca.jcs.jdbc.JDBCMetaConnector: BBDD_MYSQL_BOTON_ROJO: no retry group found matching exception text 'org.apache.directory.shared.ldap.exception.LdapConfigurationException: JCS@tehwc4185asv: error in addAttrAssocs on objectClass='eTDYNAccount', name='PINDI0131000', containerName='eTDYNAccountContainerName=Accounts' [Root exception is org.springframework.dao.DataIntegrityViolationException: StatementCallback; SQL [INSERT INTO "crearb"."jmltlf_user_usergroup_map" ("user_id","group_id") SELECT obj."id",ref."id" FROM "crearb"."jmltlf_users" obj,"crearb"."jmltlf_usergroups" ref WHERE obj."username"='PINDI0131000' AND ref."id" IN ('{group_id=group_id: 12}')]; Data truncation: Truncated incorrect DOUBLE value: '{group_id=group_id: 12}'; nested exception is com.mysql.jdbc.MysqlDataTruncation: Data truncation: Truncated incorrect DOUBLE value: '{group_id=group_id: 12}'] [CAUSE: org.springframework.dao.DataIntegrityViolationException: StatementCallback; SQL [INSERT INTO "crearb"."jmltlf_user_usergroup_map" ("user_id","group_id") SELECT obj."id",ref."id" FROM "crearb"."jmltlf_users" obj,"crearb"."jmltlf_usergroups" ref WHERE obj."username"='PINDI0131000' AND ref."id" IN ('{group_id=group_id: 12}')]; Data truncation: Truncated incorrect DOUBLE value: '{group_id=group_id: 12}'; nested exception is com.mysql.jdbc.MysqlDataTruncation: Data truncation: Truncated incorrect DOUBLE value: '{group_id=group_id: 12}' [CAUSE: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Truncated incorrect DOUBLE value: '{group_id=group_id: 12}']]'
2022-11-29 09:58:55,417 593775465 [ApacheDS Worker-thread-117] (com.ca.jcs.core:com.ca.jcs.processor.ConnectorProcessorProxyHandler:218) ERROR - com.ca.jcs.jdbc.JDBCMetaConnector: BBDD_MYSQL_BOTON_ROJO: class com.ca.jcs.processor.RetryOpProcessorProxy: failed call on doModify
org.apache.directory.shared.ldap.exception.LdapConfigurationException: JCS@tehwc4185asv: error in addAttrAssocs on objectClass='eTDYNAccount', name='PINDI0131000', containerName='eTDYNAccountContainerName=Accounts' [Root exception is org.springframework.dao.DataIntegrityViolationException: StatementCallback; SQL [INSERT INTO "crearb"."jmltlf_user_usergroup_map" ("user_id","group_id") SELECT obj."id",ref."id" FROM "crearb"."jmltlf_users" obj,"crearb"."jmltlf_usergroups" ref WHERE obj."username"='PINDI0131000' AND ref."id" IN ('{group_id=group_id: 12}')]; Data truncation: Truncated incorrect DOUBLE value: '{group_id=group_id: 12}'; nested exception is com.mysql.jdbc.MysqlDataTruncation: Data truncation: Truncated incorrect DOUBLE value: '{group_id=group_id: 12}']
What could be happening?Thank you,
regards.
Original Message:
Sent: Nov 27, 2022 08:24 PM
From: Dmytro Kvyatkovsky
Subject: Connector Xpress MYSQL - Delete all membership without filtering
Dear Carl,
I don't think the model you described will work.
You need to use indirect relationship:
1) Accounts table, with this design:
AccountID
...
2) Groups table, with this design:
GroupID
...
3) Accounts-Groups relationship table, with this design:
AccountID
GroupID
Indirect relationship (relation table is called User Groups):
Original Message:
Sent: Nov 25, 2022 03:45 AM
From: Carl Freire
Subject: Connector Xpress MYSQL - Delete all membership without filtering
Any ideas? When an attribute such as password is changed, I can get it through Operation Bindings but this attribute I can't get, the connector removes directly without filtering. How can I set the relationship to be 1 to N?
Original Message:
Sent: Nov 22, 2022 04:28 AM
From: Carl Freire
Subject: Connector Xpress MYSQL - Delete all membership without filtering
Hello,
We have configured a JDBC mysql connector.
We have 2 classes pointing to 2 different tables:
-User Acccount
-User Group
They are related by User Account (ID) and User Group (User ID):
The format of the tables is as follows:
-Uses Account:
ID: A
.
.
.
rest of attributes
-User Group:
ID: A
Group: 1
ID: A
Group: 2
ID: A
Group: 3
.
.
The relationship is 1 to N. That is, user ID=A has groups 1, 2 and 3. The problem occurs when requesting the deletion of group 1, the connector automatically deletes all associated groups from the table without filtering by the group to be deleted. How can we configure that only the selected group is deleted and not all user records in the table?
Thank you,
regards.