Revert optimisation from #2742 in order to keep all the processes from Eloquent and simplify maintenance.
The main feature difference is that it's requiring a unique index whereas my previous implementation was only using the filter "attributes". This new implementation is closer to Laravel's implementation, it only removes the nested transaction and catch the MongoDB exception instead of the PDO exception.
Fix PHPORM-180 Alternative to #2980
Revert optimisation from #2742 in order to keep all the processes from Eloquent and simplify maintenance.
The main feature difference is that it's requiring a unique index whereas my previous implementation was only using the filter "attributes". This new implementation is closer to Laravel's implementation, it only removes the nested transaction and catch the MongoDB exception instead of the PDO exception.
Checklist