| 1 | Backtracking |
| 2 | |
| 3 | The issue of Backtracking considers the need of save every version of a modified entity and makes possible the reverse of an action. Hereby will be described a perspective to solve this problematic. |
| 4 | |
| 5 | '''EntityBuilder''' |
| 6 | The EntityBuilder has the task of building an entity. There are two types of Entities: |
| 7 | |
| 8 | * Original Entity: the current and valid version of an entity. It could be recognized by the attribute systemStatus, which has the value “original”. |
| 9 | * Copy Entity: always when an entity is modified, the previous version will be saved with the systemStatus: “copy” and the new version is saved with the corresponding time stamp. |
| 10 | |
| 11 | The connection from entity to attribute and from entity to relation is done respectively by the table entity_attribute and entity_relation using only the identification(id) of each object. |
| 12 | |
| 13 | In the current version of ismi is needing the following join to build an entity: |
| 14 | |
| 15 | ''select * from entity, attribute, entity_attribute where entity.id = X && attribute.id= Y && entity_attribute.entityId = X && entity_attribute.attributeId= Y'', |
| 16 | Where X, Y are Numbers. |