consistency

64 views
Skip to first unread message

Bennie Kloosteman

unread,
Nov 13, 2012, 2:55:50 AM11/13/12
to ddd...@googlegroups.com
I often see cqrs samples  go 


Do Something to in memory model .
Persist()
Fire Events;   // in Event Sourcing some events do the  persisting ,..


but doesn't this allow the domain to get out of wack with the database ? eg what if the model is updated and then the database transaction fails ?   

Or do you work with singular roots and only allow another command to use that once the data is persisted ?

Regards, 

Ben

Greg Young

unread,
Nov 13, 2012, 3:12:27 AM11/13/12
to ddd...@googlegroups.com

Changes are transient until persisted. If a persist fails the easiest thing is to evict the ibject from memory though you can support undos

Bennie Kloosteman

unread,
Nov 13, 2012, 3:15:57 AM11/13/12
to ddd...@googlegroups.com
Thanks a lot for your comments Greg , is it common to do this ? Or do people live with it unless a specific requirement ?

Ben

@yreynhout

unread,
Nov 13, 2012, 3:58:44 AM11/13/12
to ddd...@googlegroups.com
Unit of work?
Reply all
Reply to author
Forward
0 new messages