what is the subtle difference ?

Hi, I read in the Aurelius online document that a objectmanager keeps only one instance of the same object regardless of queries return some identical objects. On the other hand, according to Removing Duplicated Objects topic, the same TInvoice object will be returned more than once in the result list. So I'm a bit confused. Can you explain the subtle difference ?

Aurelius keeps the same instance of an entity across he whole manager.
Suppose you have a TCustomer with id 10. There will be only one instance of a TCustomer object with id 10 in the manager.

But of course, you can have many references so such object. You can have many list items pointing to the same instance, or other object associations pointing to that instance.

Remove Duplicated Objects will remove list items that point to the same instance. You might have list item 0, 1, 2 and 3 all points to the same TCustomer with id 10.

That is mentioned in the doc:

This means that if an invoice has two or more items with price equals to 20, the same TInvoice object will be returned more than once in the result list.

Thank you Wagner. Now it is clear to me

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.