mindlesscloud commented on code in PR #4706:
URL:
https://github.com/apache/incubator-devlake/pull/4706#discussion_r1143237432
##########
backend/core/dal/dal.go:
##########
@@ -239,7 +240,8 @@ func GetPrimarykeyColumnNames(d Dal, dst Tabler) (names
[]string, err errors.Err
return
}
for _, pkColumn := range pkColumns {
- names = append(names, pkColumn.Name())
+ // in case the column name is a reserved identifier
+ names = append(names, fmt.Sprintf("%s.%s", dst.TableName(),
pkColumn.Name()))
Review Comment:
If the column name is a database reserved identifier, it would cause a
database error. Take the table `project_mapping` as an example, there is a
column named `table` which also happens to be a MySQL reserved word.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]