fix: Prevent N+1 query in LocalPersistentVolume.isDockerComposeResource()

Use relationLoaded() check before accessing the application relationship
to avoid triggering individual queries for each volume when rendering
storage lists. Update Storage.php to eager load the relationship.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Andras BacsaiandClaude Opus 4.5 committed 2025-12-11 21:23:46 +01:00
1 parent f152ec00ad
commit 475cfd78cd
2 files changed
+54 -1

No files matched your search

+1 -1
View File
@@ -67,7 +67,7 @@ class Storage extends Component
public function refreshStorages()
{
$this->fileStorage = $this->resource->fileStorages()->get();
$this->resource->refresh();
$this->resource->load('persistentStorages.resource');
}
public function getFilesProperty()