geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Mulder <ammul...@alumni.princeton.edu>
Subject TranQL/OpenEJB enforce-foreign-key-constraints
Date Mon, 13 Jun 2005 02:18:28 GMT
	So in your CMP settings, you can include the
enforce-foreign-key-constraints setting.  This ultimately causes TranQL to
use either a SimpleFlushStrategy or an EnforceRelationshipsFlushStrategy.  
I just want to double-check my understanding of this.

	Is it the case that this controls what happens when you have
pending DB changes at the end of a transaction, and TranQL has to decide
what SQL to execute?  So with the SimpleFS, it just does the
inserts/updates/deletes in whatever order it feels like.  With the
EnforceRelationshipsFS, it tries to order them according to relationships
between tables -- for example, when deleting a parent with children, it
would issue the child deletes first.

	I assume this needs to be set if your DB enforces foreign keys as 
each statement is executed, and does not need to be set if your DB doesn't 
enforce foreign keys until the transaction is committed.

	If all that's right, then my last question is, are the
calculations for the EnforceRelationshipsFS based on inspecting the DB
schema via DBMetaData or something, or are they strictly based on Entity
relationships you may have declared in your ejb-jar.xml?

Thanks,
	Aaron

Mime
View raw message