You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by "mindlesscloud (via GitHub)" <gi...@apache.org> on 2023/03/21 11:31:25 UTC
[GitHub] [incubator-devlake] mindlesscloud commented on a diff in pull request #4706: feat: set project mapping by plugin org
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: commits-unsubscribe@devlake.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org