You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The workaround in Mikro-ORM seems to converting first to an array to have access to all JS array related methods. Arrays are more flexible in JS than they are in JS, but maybe exposing those methods to Mikro-ORM collections would reduce the need for this conversion. Here are the one I often use in Doctrine:
Reduce
Find
Find first
Exists
Filter
Except from this I really love how Mikro-ORM is thought. It feels like Doctrine, but with so many pain points being lifted. That's really a breath of fresh air :)
Thanks!
The text was updated successfully, but these errors were encountered:
FYI the collection items are stored in a Set internally, so you need to convert that to an array to be able to use the native array methods. I wanted to add some of those for v6, not sure if we need reduce, and not sure what should be the difference in find and findFirst? Also we already have contains method.
Hi :),
I am coming from Doctrine world, where collections are having a lot of convenient methods (https://www.doctrine-project.org/projects/doctrine-collections/en/stable/index.html).
The workaround in Mikro-ORM seems to converting first to an array to have access to all JS array related methods. Arrays are more flexible in JS than they are in JS, but maybe exposing those methods to Mikro-ORM collections would reduce the need for this conversion. Here are the one I often use in Doctrine:
Except from this I really love how Mikro-ORM is thought. It feels like Doctrine, but with so many pain points being lifted. That's really a breath of fresh air :)
Thanks!
The text was updated successfully, but these errors were encountered: