History of objects in a repository?

Hi,

When you are in revision history, can you search for all changes to one object (e.g. table). Such option is available in TortoiseSVN, clicking on an object shows all revisions containing modification of that object.

Thx

Answers

  • Hey @tdobe have you tried right clicking and hitting view history on the object itself, as opposed to top level on the database? It's been a while since I used SQL Source Control, but from memory it should just give you the history for that one object.
  • Hi @tdobe

    If you're still experiencing this issue would you be able to reach out to us in support and we can investigate this further https://productsupport.red-gate.com/hc/en-us

    Kind regards

    Dan Calver | Redgate Software
    Have you visited our 
    Help Center?

  • DashcrushDashcrush Posts: 2 New member

    We have an aggregate root called Animal, which has properties such as Status and Source. Currently the database has two tables called StatusHistory and SourceHistory, which stores information about the animal when the status is changed. These tables sometimes have records deleted, and rarely need to be retrieved when getting an Animal from the AnimalRepository.

    So the big question is where do they belong? Here are a couple of ideas we have:

    • Have them both as different entity objects as part of the animal aggregate. And have corresponding methods which allow them to be updated eg: Animal.UpdateStatus(newStatus), which would add to the collection with a new StatusHistory(this) object. But as mentioned above these are rarely required when get an existing animal for the repository, so we don't wan't the repository loading them. We are currently not using an ORM and are manually mapping using a table data gateway inside the repositories.

    • Make each of the history entities an aggregate root. We are not a fan of this , as it feel like we aren't really modelling the domain and just drifting towards an Active Record Pattern. Also the task of updating these for the animal with have to lie outside of the animal entity.

    • We could try combining these histories into another aggregate root called AnimalHistory whose whole purpose is to maintain the history of the animal. But again it would be moving logic about storing the history into something other then the animal. Possibly a service like AnimalProcessingService, which feel like we might be heading toward an anemic design.

Sign In or Register to comment.