- Add latest attribute to VersionedModel and set existing entities' latest attribute to false on save.
- Use prepare_for_save to set entity_id, version, previous_version and changed_by_id fields.
- Update delete implementation to set active=false and save.
- Update get_ implementations to support different data types in conditions and only query active and latest results.