Skip to content

Commit

Permalink
fix(convention): fix camel to snake case for FK
Browse files Browse the repository at this point in the history
  • Loading branch information
dalssoft committed May 5, 2023
1 parent 38196ae commit 33a673a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/convention.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = class Convention {
camelToSnake (string) {
return string.replace(/([A-Z])/g, '_$1').toLowerCase()
return string.replace(/([A-Z])/g, '_$1').toLowerCase().replace(/^_/, '')
}

toTableFieldName (entityField) {
Expand Down

0 comments on commit 33a673a

Please sign in to comment.