When retrieving a entity from the database does Mendix retrieve all associated entities and put them into memory?
Hi All, I am curious. When retrieving a entity from the database does Mendix retrieve all associated entities and put them into memory? If i retrieve the first entity from the DB can i retrieve the associated entity “By association” and will mendix have it in memory or will it be retrieved from the DB. We are optimizing our system to be as fast as possible and to cut down Database calls. Regards, Patrick
Retrieving an entity from the database will only retrieve that entity, no associated records. You can imagine that a simple retrieve of Customer could end up retrieving a ton of data if it also automatically pulled order, the items on those orders, the details of payment, the related inventory records, etc, etc.
Yes, after pulling from db if you then pull by association it will go back to the db, assuming some other step had not causes it to be retrieved.