Skip to content

Commit d59ab62

Browse files
committed
Add readOnly parameter documentation to README
1 parent 79eff66 commit d59ab62

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,15 @@ foreach ($categories as $category) {
101101

102102
- **Batch Size:** Set a custom batch size for preloading to optimize memory usage.
103103
- **Max Fetch Join Same Field Count:** Define the maximum number of join fetches allowed per field.
104+
- **Read Only:** Mark preloaded entities as read-only to disable change tracking and improve performance.
104105

105106
```php
106107
$preloader->preload(
107108
$articles,
108109
'category',
109110
batchSize: 20,
110-
maxFetchJoinSameFieldCount: 5
111+
maxFetchJoinSameFieldCount: 5,
112+
readOnly: true,
111113
);
112114
```
113115

0 commit comments

Comments
 (0)