Skip to content

Commit

Permalink
warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
JabX committed Oct 25, 2023
1 parent cd6ba6e commit af144de
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions TopModel.Generator.Core/GeneratorBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,6 @@ public void OnFilesChanged(IEnumerable<ModelFile> files, LoggingScope? storeConf
HandleFiles(handledFiles);
}

protected string GetBestClassTag(Class classe, string tag)
{
return classe.Tags.Contains(tag) ? tag : classe.Tags.Intersect(Config.Tags).FirstOrDefault() ?? tag;
}

protected IEnumerable<ClassValue> GetAllValues(Class classe)
{
foreach (var value in classe.Values)
Expand All @@ -92,5 +87,10 @@ protected IEnumerable<ClassValue> GetAllValues(Class classe)
}
}

protected string GetBestClassTag(Class classe, string tag)
{
return classe.Tags.Contains(tag) ? tag : classe.Tags.Intersect(Config.Tags).FirstOrDefault() ?? tag;
}

protected abstract void HandleFiles(IEnumerable<ModelFile> files);
}
2 changes: 1 addition & 1 deletion TopModel.Generator.Jpa/JpaDaoGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ protected override void HandleClass(string fileName, Class classe, string tag)
fw.WriteLine();
if (Config.CanClassUseEnums(classe))
{
fw.AddImport($"{Config.GetEnumPackageName(classe, tag)}.{Config.GetType(classe.PrimaryKey.SingleOrDefault() ?? classe.Extends?.PrimaryKey.SingleOrDefault())}");
fw.AddImport($"{Config.GetEnumPackageName(classe, tag)}.{Config.GetType(classe.PrimaryKey.SingleOrDefault() ?? classe.Extends!.PrimaryKey.Single())}");
}

string pk;
Expand Down

0 comments on commit af144de

Please sign in to comment.