You are not logged in.
If the number of the records gets larger (than 1000), it seems useful to move the records that are three days old from one table into another table (as an archive). Could you help to comment whether it is possible to implement this situation with one TSQLRecord descendant, instead of one TSQLRecordActive and one TSQLRecordNonActive with identical properties ?
(PS: Maybe it is not possible because ORM applies strict relation between class and table, as seen from this link http://stackoverflow.com/questions/8018597/)
Last edited by ComingNine (2014-05-08 14:19:18)
Offline
If you inherit from any TSQLRecord like this:
TSQLMyTableArchived = class(TSQLMyTable);
it will create a new class, so a new table.
Add both classes in the model, then you can easily move data from TSQLMyTable into TSQLMyTableArchived, with a CreateAndFillPrepare() + CopyValues() + BatchAdd()
Offline
Thank you for your helpful comments very much ! This should work !
Offline