Skip to content

Commit

Permalink
Merge pull request #333 from Yachef/fix_multi_extends
Browse files Browse the repository at this point in the history
correction erreurs quand heritage chainé
  • Loading branch information
gideruette authored Jan 17, 2024
2 parents 6948f37 + 2985c6f commit ff96394
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion TopModel.Generator.Jpa/JpaDaoGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ protected override void HandleClass(string fileName, Class classe, string tag)
string pk;
if (!classe.PrimaryKey.Any() && classe.Extends != null)
{
pk = Config.GetType(classe.Extends.PrimaryKey.Single());
pk = Config.GetType(classe.ExtendedProperties.Single(p => p.PrimaryKey));
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion TopModel.Generator.Jpa/JpaModelPropertyGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ private void WriteProperty(JavaWriter fw, Class classe, AssociationProperty prop
}

fw.AddImport("org.springframework.data.relational.core.mapping.Column");
fw.WriteLine(1, $@"@Column(""{property.Association.PrimaryKey.First().SqlName.ToLower()}"")");
fw.WriteLine(1, $@"@Column(""{property.Property.SqlName.ToLower()}"")");
fw.WriteLine(1, $"private {_config.GetType(property)} {property.NameCamel};");
}
}
Expand Down

0 comments on commit ff96394

Please sign in to comment.