-
1. Re: How to delete history down from a certain date?
adamw Feb 26, 2010 7:15 AM (in response to eiswind1)I think the best way is to:
* make sure that the relations between audit tables and the revision info table (rev id <-> id) have delete cascade
* delete from rev_info r where r.date < :date
Adam
-
2. Re: How to delete history down from a certain date?
eiswind1 Feb 26, 2010 7:17 AM (in response to adamw)Thanks Adam,
how can I set the delete cascade on these tables ? AFAIK they are generated by envers and I have no influence on that, have I ?
Regards Thomas
-
3. Re: How to delete history down from a certain date?
adamw Feb 26, 2010 12:11 PM (in response to eiswind1)Aren't they included in the auto-generated schema? If not, you can create a JIRA issue for that, though I'm not quite sure yet if this should be the default.
I normally just generate the "initial" schema automatically and then include it in a sql-create script so that it can go in production. And there I can freely add constraints, cascades etc
Also, if you add them manually, afaik they won't be removed by hbm2ddl.
Adam