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
I have a question:
Is there a way to avoid N+1 problems when mapping collections from DTO using transformers/providers (e.g. I keep identifiers in the DTOs and I want them to be loaded from the DB)? Unfortunately I couldn't find a clear answer to my question in the documentation.
The most obvious solution is to retrieve the required objects from the database in advance, before mapping, and pass them to the context. And then pass those objects from the context, but it seems to me that this is not a good solution. Is there another way to map collections?
Thanks in advance!
The text was updated successfully, but these errors were encountered:
Your comment seems to be correct: indeed, your trick can be used to achieve the desired result. But what about if the ORM Doctrine is not used, or if, for example, the objects are stored in another service's API?
Perhaps it's not Automapper's area of responsibility to solve these kinds of problems, but I think it could be a very handy feature
Hi! Thanks for the great library 🙂!
I have a question:
Is there a way to avoid N+1 problems when mapping collections from DTO using transformers/providers (e.g. I keep identifiers in the DTOs and I want them to be loaded from the DB)? Unfortunately I couldn't find a clear answer to my question in the documentation.
The most obvious solution is to retrieve the required objects from the database in advance, before mapping, and pass them to the context. And then pass those objects from the context, but it seems to me that this is not a good solution. Is there another way to map collections?
Thanks in advance!
The text was updated successfully, but these errors were encountered: