I don't have any notion of fetching strategies because if possible I avoid RDBMS.
While I am aware that we could sprinkle our locks around .. should we have to? Can we avoid these types of hard to find copy/paste bugs by allowing say a declaration that an object is an aggregate root? Greg On Mon, Apr 27, 2009 at 1:16 PM, Peter Morris <[email protected]> wrote: > >>> > Customer > Contact > Address > > for the sake of discussion let's imagine that these are all entities .. > > Customer c = CustomerRepo.Fetch(id); > c.Contact.Address.Street = "testing"; > UnitOfWork.Commit(); > << > > Your use-case knows why you are doing what you are doing. So it would load > + lock the customer and update the address in question. Do you use the > custom fetch strategies like Udi does? It strikes me that if you have a > custom fetch strategy for each reason to retrieve an entity you also have > only one place to place the correct Lock code? What needs to be locked > depends on what you are doing. Adding a new order would need to ensure the > Customer remains unchanged in order to ensure their credit limit is not > exceeded, whereas cancelling an existing order might not need to touch the > customer at all. > > Fetching strategies seem very interesting to me which is why I just emailed > Udi and asked (nagged) for a demo app which would combine custom fetching, > CQS, and domain objects without properties etc; something I am still very > curious about ;-) > > > > Pete > > > > > -- It is the mark of an educated mind to be able to entertain a thought without accepting it. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---
