This commit is contained in:
Kononnable 2019-04-11 21:11:12 +02:00
parent 85cc9fa943
commit 13eda51860

View File

@ -1,3 +1,4 @@
import changeCase = require("change-case");
import { AbstractNamingStrategy } from "./AbstractNamingStrategy";
import { EntityInfo } from "./models/EntityInfo";
import { RelationInfo } from "./models/RelationInfo";
@ -12,10 +13,8 @@ export class NamingStrategy extends AbstractNamingStrategy {
const ownerEntity = dbModel.find(
v => v.tsEntityName === relation.ownerTable
)!;
let columnName = changeCase.camelCase(columnOldName);
let columnName =
columnOldName[0].toLowerCase() +
columnOldName.substring(1, columnOldName.length);
if (
columnName.toLowerCase().endsWith("id") &&
!columnName.toLowerCase().endsWith("guid")