23 | | ''select * from entity, attribute, entity_attribute where entity.id = X && attribute.id= Y && entity_attribute.entityId = X && entity_attribute.attributeId= Y && entity.systemStatus = “original” && attribute.systemStatus = original“.'' |
| 23 | ''select * from entity, attribute, entity_attribute where entity.id = X && attribute.id= Y && entity_attribute.entityId = X && entity_attribute.attributeId= Y && entity.systemStatus = “original” && attribute.systemStatus = original“'', where X and Y are numbers. |
| 24 | |
| 25 | The attribute systemStatus is not useful to build the a version of an entity, because every entity's versions will have the same value. The attribute unique for each version is the modifier, therefore the query will look like this: |
| 26 | |
| 27 | ''select * from entity, attribute, entity_attribute where entity.id = X && attribute.id= Y && entity_attribute.entityId = X && entity_attribute.attributeId= Y && entity. modifier = Z && attribute. modifier = Z'', where X and Y are numbers and Z is a time stamp. |