Book a Demo

Author Topic: How to figure the link between three classes  (Read 2136 times)

peter king

  • EA User
  • **
  • Posts: 20
  • Karma: +0/-0
    • View Profile
How to figure the link between three classes
« on: July 13, 2009, 05:06:24 pm »
Hi i have give three classes Item, ItemStatus and Item'sStatusHistory.

I cannot figureout to which class ItemStatus should link to!

please refer to my blog in the following link to detail description of the issue

http://8134502134343434345.blogspot.com/

cheers

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How to figure the link between three classes
« Reply #1 on: July 13, 2009, 06:01:19 pm »
It feels like you should reconsider that design.
There are standard patterns that deal with keeping history in general, not specific to this one status feature. Think about what you will need to do if you have to keep the history of another attribute or relation.
The class ItemsStatusHistory feels a bit akward.
Take a look at  Memento (GoF): http://en.wikipedia.org/wiki/Memento_pattern
or Temporal Object (Martin Fowler) http://martinfowler.com/ap2/temporalObject.html for a start.

Geert