first, sorry if my english is buggy.
I have the need of tracking when a user uses the same address when placing different orders, and i noticed that nop clone the address referenced by the user entity upon creating the order:
//clone billing address
billingAddress = (Address)customer.BillingAddress.Clone();
... later on ....
var order = new Order() {
....
BillingAddress = billingAddress,
ShippingAddress = shippingAddress,
....
};
This don't allow me to see (programmatically) if two orders by the same user share the same address (they'll have different IDs).
Why this happens? I mean, even if a user where to delete one of its addresses, it would be sufficient to delete the entry in the mapping table whilst the address for the (eventual) order would remain untouched! It's also waste of space isn't it.
Can i safely override this behaviour?
Thanks in advance for the reply, and huge thanks for this amazing piece of software engineering btw.