geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dain Sundstrom <d...@iq80.com>
Subject Re: TranQL/OpenEJB enforce-foreign-key-constraints
Date Mon, 13 Jun 2005 02:21:17 GMT
On Jun 12, 2005, at 7:18 PM, Aaron Mulder wrote:

>     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.

Aaron,

This is my understanding, but hopefully Gianny will respond with a  
definitive answer.

>     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?

I don't think TranQL uses DBMetaData at all.

-dain

Mime
View raw message