Skip to content

Commit 062ba0d

Browse files
ajcvickersCopilot
andauthored
Update src/MongoDB.EntityFrameworkCore/Storage/MongoDatabaseCreator.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent f1fb915 commit 062ba0d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/MongoDB.EntityFrameworkCore/Storage/MongoDatabaseCreator.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,10 @@ private static bool HasAtlasIndexes(IEntityType entityType)
314314

315315
foreach (var ownedEntityType in entityType.Model.GetEntityTypes().Where(o => o.FindDeclaredOwnership()?.PrincipalEntityType == entityType))
316316
{
317-
return HasAtlasIndexes(ownedEntityType);
317+
if (HasAtlasIndexes(ownedEntityType))
318+
{
319+
return true;
320+
}
318321
}
319322

320323
return false;

0 commit comments

Comments
 (0)