hibernate/hibernate-orm — pull request #485 by lukasz-antoniak (2013-03-18 18:44:50+00:00)
Title: HHH-7807 - Cascade delete revisions

Patch and test for HHH-7807 JIRA ticket.
Link: https://hibernate.atlassian.net/browse/HHH-7807

@sebersole: Can you review the hibernate-core part? @stliu agreed to port changes to metamodel branch once it has been pushed to master.

Below ON DELETE CASCADE syntax works for Oracle, H2, SQL Server, DB2, MySQL, PostgreSQL (suppose all dialects with positive Dialect#supportsCascadeDelete()):
``create table IntTestEntity_AUD (id integer not null, REV integer not null, REVTYPE integer, NUMERIC_VALUE integer, primary key (id, REV));``
``create table REVINFO (REV integer not null, REVTSTMP integer, primary key (REV));``
``alter table IntTestEntity_AUD add constraint FKE5E1101567C021C6 foreign key (REV) references REVINFO on delete cascade;``

@adamw: Can you review hibernate-envers part?

Regards,
Lukasz Antoniak