diff --git a/TopModel.Generator.Jpa/JpaModelPropertyGenerator.cs b/TopModel.Generator.Jpa/JpaModelPropertyGenerator.cs index 080e4215..09e3c529 100644 --- a/TopModel.Generator.Jpa/JpaModelPropertyGenerator.cs +++ b/TopModel.Generator.Jpa/JpaModelPropertyGenerator.cs @@ -426,7 +426,7 @@ private void WriteConvertAnnotation(JavaWriter fw, CompositionProperty property, { var javaOrJakarta = _config.PersistenceMode.ToString().ToLower(); fw.AddImport($"{javaOrJakarta}.persistence.Convert"); - fw.AddImport(_config.CompositionConverterCanonicalName.Replace("{class}", property.Class.Name).Replace("{package}", _config.GetPackageName(property.Class, tag))); + fw.AddImport(_config.CompositionConverterCanonicalName.Replace("{class}", property.Composition.Name).Replace("{package}", _config.GetPackageName(property.Class, tag))); fw.WriteLine(indentLevel, $"@Convert(converter = {_config.CompositionConverterSimpleName.Replace("{class}", property.Class.Name)}.class)"); }