CASCADE « Schema « JPA Q&A





1. SchemaExport Ignoring Cascade Constraints    forum.hibernate.org

I'm using the SchemaExportTask to generate my schema from the mapping docs, and it isn't putting the correct "ON DELETE CASCADE" into the constraints. It's not putting anything for the cascade information. The cascade attribute is set to delete in appropriate locations in the mapping document. Is this a limitation with the SchemaExport utility? Is there a workaround? I'm running Hibernate ...

2. Schema Export with "on update" (either cascade or    forum.hibernate.org

Hi, I am using Hibernate 3.1 (and annotations 3.1beta7) and wanted Hibernate to create my tables automatically defining the "on update" to cascade (or no action, in some cases) for foreign keys constraints. I searched all over the documentation, but couldn't make it work. It creates the foreign key without specifying the behaviour for "on update", what I would like to ...

3. SchemaExport and cascade delete constraints    forum.hibernate.org

Is is normal for Hibernate's auto schema ddl generation to generate two FK constraints when an association specifies cascade delete (@OnDelete(action=OnDeleteAction.CASCADE)). I get the following constraints: alter table cal_property_index add constraint FKBA988E7927801F2 foreign key (eventstampid) references stamp alter table cal_property_index add constraint FKBA988E79FD15B882 foreign key (eventstampid) references stamp on delete cascade Shouldn't there only be the second? -Randy

4. SchemaUpdate many-to-one cascade delete mapping    forum.hibernate.org

I am trying to use this mapping from the HelloWorld tutorial. The complete mapping is pasted below. The problem that I have is that the DB that I am using (SQLBase) gives me the following error: "Self-reference foreign key must have CASCADE delete rule " If I change cascade="all" to cascade="delete", I still get the same ...