Skip to content

Commit a45f839

Browse files
committed
debugging
1 parent cee74fd commit a45f839

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Diff for: src/EFCore.Cosmos/Storage/Internal/CosmosDatabaseCreator.cs

+6-3
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ private static IEnumerable<ContainerProperties> GetContainersToCreate(IModel mod
139139
defaultTtl ??= entityType.GetDefaultTimeToLive();
140140
throughput ??= entityType.GetThroughput();
141141

142-
ProcessEntityType(entityType, indexes, vectors, fullTextProperties);
142+
ProcessEntityType(entityType, indexes, vectors, fullTextProperties, 0);
143143
}
144144

145145
yield return new ContainerProperties(
@@ -157,8 +157,10 @@ static void ProcessEntityType(
157157
IEntityType entityType,
158158
List<IIndex> indexes,
159159
List<(IProperty Property, CosmosVectorType VectorType)> vectors,
160-
List<(IProperty Property, string Language)> fullTextProperties)
160+
List<(IProperty Property, string Language)> fullTextProperties,
161+
int i)
161162
{
163+
if (i > 10) throw new InvalidOperationException("infinite");
162164
indexes.AddRange(entityType.GetIndexes());
163165

164166
foreach (var property in entityType.GetProperties())
@@ -175,9 +177,10 @@ static void ProcessEntityType(
175177
}
176178
}
177179

180+
i = i + 1;
178181
foreach (var ownedType in entityType.GetNavigations().Where(x => x.ForeignKey.IsOwnership).Select(x => x.TargetEntityType))
179182
{
180-
ProcessEntityType(ownedType, indexes, vectors, fullTextProperties);
183+
ProcessEntityType(ownedType, indexes, vectors, fullTextProperties, i);
181184
}
182185
}
183186
}

0 commit comments

Comments
 (0)