We have a scenario in which active records are stored in one table and old records are archived over time. Table structures for two tables - active and archive.
e.g. DomainObject_Current: ID INT: auto-increment key Value INT TimeStamp
DomainObject_Archive ID INT Value INT Timestamp
On a weekly basis, we transfer records for 30 days to the archive table from the current table. The identifier (primary key) is unique in two tables.
The application must be agnostic of whether the data comes from the current table or the Archive table. What is the best way to map a DomainObject class in this scenario?
Ak lo source
share