Skip to content

Commit e8221ae

Browse files
committed
- fixes a bug were duplicated annotations would introduce duplicated cast methods
1 parent 0a5e1fb commit e8221ae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/GraphODataTemplateWriter/CodeHelpers/Java/TypeHelperJava.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1200,13 +1200,13 @@ public static string CreatePackageDef(this CustomT4Host host)
12001200
?.ToList()
12011201
?.ForEach(x => methodImports.Add(x));
12021202
c?.NavigationProperties()
1203-
?.Where(x => x.IsCollection)?
1203+
?.Where(x => x.IsCollection && x.ParentPropertyType == null)?
12041204
.Select(x => x.Projection.Type)
12051205
?.Distinct()
12061206
?.ToList()
12071207
?.ForEach(x => ImportRequestBuilderTypes(host, x, methodImports, importFormat, interfaceTemplatePrefix, true));
12081208
c?.NavigationProperties()
1209-
?.Where(x => !x.IsCollection)
1209+
?.Where(x => !x.IsCollection && x.ParentPropertyType == null)
12101210
?.Select(x => x.Projection.Type)
12111211
?.Distinct()
12121212
?.ToList()

0 commit comments

Comments
 (0)