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