But just like batch loading of collections, this sounds like it would imply multiple round trips to the database. Perhaps in some cases, multiple round trips make sense, but I'm not convinced that this is one of those situations.
I agree it's not ideal: we should also improve the generated SQL but admittedly we have to consider that the amount of parameters one should bind is not uncapped: hence some limit must be chose to load in batches. This batch size could eventually be set to a very high number if you have "proper" SQL being generated, but it must be capped meaning that such an option makes sense in the long term.
|