From 33a673aa4ca1b20cd62bd0ff5d560734006447fc Mon Sep 17 00:00:00 2001 From: David Lojudice Sobrinho Date: Fri, 5 May 2023 11:46:10 -0300 Subject: [PATCH] fix(convention): fix camel to snake case for FK --- src/convention.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/convention.js b/src/convention.js index c5d6ce8..2208558 100644 --- a/src/convention.js +++ b/src/convention.js @@ -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) {