From 1bb0e0ae0ac54288c77f2094ccb343dd4ebe8321 Mon Sep 17 00:00:00 2001 From: Nikitin Aleksandr Date: Thu, 16 May 2024 13:06:18 +0300 Subject: [PATCH] =?UTF-8?q?=D1=81=D0=B4=D0=B5=D0=BB=D0=B0=D0=BB=20IntFromA?= =?UTF-8?q?lias?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/create_files/create_files.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/create_files/create_files.go b/internal/create_files/create_files.go index 9b3bd07..d993061 100644 --- a/internal/create_files/create_files.go +++ b/internal/create_files/create_files.go @@ -276,12 +276,12 @@ func ReplacePrimaryKeyM_ID(Text string, Table1 *types.Table) string { //Alias преобразуем в int64, и наоборот if Alias != "" { Otvet = strings.ReplaceAll(Otvet, "IntFromAlias(m.ID)", ColumnTypeGoPK+"(m."+ColumnNamePK+")") - Otvet = strings.ReplaceAll(Otvet, "IntToAlias(m.ID)", OtvetColumnName) - Otvet = strings.ReplaceAll(Otvet, "IntToAlias(ID)", Alias+"("+ColumnNamePK+")") + Otvet = strings.ReplaceAll(Otvet, "AliasFromInt(m.ID)", OtvetColumnName) + Otvet = strings.ReplaceAll(Otvet, "AliasFromInt(ID)", Alias+"("+ColumnNamePK+")") } else { Otvet = strings.ReplaceAll(Otvet, "IntFromAlias(m.ID)", "m."+ColumnNamePK+"") - Otvet = strings.ReplaceAll(Otvet, "IntToAlias(m.ID)", OtvetColumnName) - Otvet = strings.ReplaceAll(Otvet, "IntToAlias(ID)", "ID") + Otvet = strings.ReplaceAll(Otvet, "AliasFromInt(m.ID)", OtvetColumnName) + Otvet = strings.ReplaceAll(Otvet, "AliasFromInt(ID)", "ID") } return Otvet