Skip to content

Commit

Permalink
review corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
JanTvrdik committed Oct 9, 2024
1 parent 2ece55c commit 5973bd4
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 18 deletions.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Bedabox, LLC dba ShipMonk

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
20 changes: 2 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
`shipmonk/doctrine-entity-preloader` is a PHP library designed to tackle the n+1 query problem in Doctrine ORM by efficiently preloading related entities. This library offers a flexible and powerful way to optimize database access patterns, especially in cases with complex entity relationships.

- 🚀 **Performance Boost:** Minimizes n+1 issues by preloading related entities with **constant number of queries**.
- 🔄 **Flexible:** Supports `OneToOne`, `OneToMany`, `ManyToOne`, and `ManyToMany` associations.
- 🔄 **Flexible:** Supports all associations: `#[OneToOne]`, `#[OneToMany]`, `#[ManyToOne]`, and `#[ManyToMany]`.
- 💡 **Easy Integration:** Simple to integrate with your existing Doctrine setup.
- 🛠️ **Configurable:** Customizable batch sizes and fetch join limits.

## Installation

Expand Down Expand Up @@ -54,7 +53,7 @@ Unlike fetch joins, the EntityPreloader does not fetches duplicate data, which s
Unlike `setFetchMode` it can

* preload nested associations
* preload many has many association
* preload `#[ManyToMany]` association
* avoid additional queries fired by Doctrine during hydration process

## Configuration
Expand All @@ -74,24 +73,9 @@ $preloader->preload(
```


## Supported Association Types

- `OneToOne`
- `OneToMany`
- `ManyToOne`
- `ManyToMany`


## Limitations

- no support for ordered collections
- no support for indexed collections
- no support for dirty collections
- no support for composite primary keys


## License

`shipmonk/doctrine-entity-preloader` is open-source software licensed under the MIT license.

Enjoy optimal performance with efficient entity preloading!

0 comments on commit 5973bd4

Please sign in to comment.