my second post in a day, apologies for spam. Hopefully somebody will know ...
I have a big roo project in production for quite a long time.
Now I am facing problem with tables becoming huge. Since I do not need to keep data older than 3 months, I am thinking about moving data from "active" tables into archive tables in some batch nightly process.
as id in my entities.
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "id")
Now, the question is: what is the best way to create the copies of the entities which differ only at Id, since IDs need to be the same as in "active" tables, I can't use JPA annotation, but set ids manually.
By "the best", I mean:
- minor to no change in existing entities,
- little repetition (avoiding copy paste) in archive entities.
- no change in existing db tables.
Thanks in advance,