openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gokhan Ergul <gokhan.er...@telenity.com>
Subject Re: [jira] Commented: (OPENJPA-235) SQL reordering to avoid non-nullable foreign key constraint violations
Date Thu, 21 Jun 2007 17:33:38 GMT
Abe White wrote:
>> Is that a hint to set openjpa.jdbc.SchemaFactory=native 
>> (ForeignKeys=true)?
>>     
>
> No.  I'm saying that if these secret tests rely on OpenJPA to detect  
> foreign keys based on the above setting, 
Secret tests?

> then it's likely that the  
> problem is in OpenJPA's ability to detect the existing foreign keys  
> rather than in OpenJPA's constraint analyses and SQL ordering.  For  
> example, I know in some versions of MySQL the standard  
> DatabaseMetaData.getExportedKeys call didn't work unless the keys  
> were created with ALTER TABLE statements rather than in the CREATE  
> TABLE statement.
>   
Understood. I was however under the impression that correctly annotated 
relations would make it unnecessary to resort to database metadata to 
build a correct dependency graph --it appears that's not the case.

FWIW, setting SchemaFactory=native(ForeignKeys=true) does fix that 
particular problem with ConstraintUpdateManager.

Mime
View raw message