Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

hibernate support for deferred constraints?

In Hibernate 3.6, what is the support for deferred constraints?

As I get it, in 3.2, "Hibernate does not have support for deferred constraints." (from http://opensource.atlassian.com/projects/hibernate/browse/HHH-2248)

like image 997
iliaden Avatar asked Jun 27 '11 18:06

iliaden


People also ask

What is deferred constraint?

DEFERRED constraints are not checked until transaction commit. Each constraint has its own IMMEDIATE or DEFERRED mode. Upon creation, a constraint is given one of three characteristics: DEFERRABLE INITIALLY DEFERRED , DEFERRABLE INITIALLY IMMEDIATE , or NOT DEFERRABLE .

What is a deferred constraint in SQL?

If a constraint is deferrable, this clause specifies the default time to check the constraint. If the constraint is INITIALLY IMMEDIATE, it is checked after each statement, which is the default. If the constraint is INITIALLY DEFERRED, it is checked only at the end of the transaction.

Why do you need deferrable option in case of SQL transactions?

To recap, declaring a constraint deferrable allows transactions to defer validation until commit time.

What is initially deferred deferrable in Oracle?

When you add a DEFERRABLE constraint, you can mark it as INITIALLY IMMEDIATE or INITIALLY DEFERRED. INITIALLY IMMEDIATE means that the constraint is checked whenever you add, update, or delete rows from a table. INITIALLY DEFERRED means that the constraint is only checked when a transaction is committed.


1 Answers

The issue you linked was originally filed against Hibernate 3.2. It does not yet have a fix version and the status is open, which implies that the issue still exists and deferred constraints is not yet supported in any version of Hibernate.

like image 185
lucygucy Avatar answered Oct 06 '22 20:10

lucygucy