When you load the customers collection, no orders are loaded. If you access a Customer.OrderList then it will be loaded at that time. This is the lazy loading feature. Also to keep referential integrity all order for all loaded customers are loaded. So yes
if you have loaded 100,000 customers you will get all orders for these customers. This is why usually you will want to load only the customers you are working with. This goes for any data-loading framework.
If you do not want to use lazy loading, you can explicitly load customers and order at the same time. You can create a subdomain, which is a container in which all objects loaded. Then explicitly define what should be loaded. Notice below that I have selected
all customers and then all order by customer id. These are predefined select commands based on the relations in the model. Yu can follow the pattern and add your own of course as well.
SubDomain subdomain = new SubDomain();
var customerList = subdomain.GetCollection<CustomerCollection>();
Obviously all of these objects are loaded into memory so I would suggest not loading 100,000 customers. This is a nice pagination system built into the framework so load only what you need in the methods you are building.
If you need to bulk update data there is no reason to load objects at all. Simply use the syntax for bulk update. The following example shows how to update all first names for people with an email address of “firstname.lastname@example.org”. This updates many records
without loading the data into memory. The caveat is that it only works on one field at a time. You define a field, a where statement, and a new value. Good news is that it is a lambda syntax so it is compile time checked.
CustomerCollection.UpdateData(x => x.FirstName, x => x.Email == "email@example.com", "John");