Hibernate SchemaExport does not filter ForeignKey for namespaces and tables

Description

See : https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/main/java/org/hibernate/tool/schema/internal/SchemaCreatorImpl.java#L357

The generation of the Foreign key constraint shall be filtered with foreign key table according to its table namespace, as done to create schema objects.

It can be achieved the same way :

//NOTE : Foreign keys must be created *after* all tables of all namespaces for cross namespace fks. see HHH-10420 for ( Namespace namespace : database.getNamespaces() ) { // NOTE : Foreign keys must be created *after* unique keys for numerous DBs. See HHH-8390 if ( !schemaFilter.includeNamespace( namespace ) ) { continue; } for ( Table table : namespace.getTables() ) {

Activity

Show:
Former user
changed the StatusAugust 12, 2016 at 9:14 PM
Resolved
Closed
Andrea Boriero
updated the LinkApril 14, 2016 at 3:26 PM
None
This issue relates to HHH-10526
Andrea Boriero
changed the StatusMarch 30, 2016 at 9:14 AM
Open
Resolved
Andrea Boriero
updated the ResolutionMarch 30, 2016 at 9:14 AM
None
Fixed
Andrea Boriero
updated the SummaryMarch 30, 2016 at 8:55 AM
Hibernate SchemaExport does not filter ForeignKey for namespaces
Hibernate SchemaExport does not filter ForeignKey for namespaces and tables
Andrea Boriero
updated the Fix versionsMarch 30, 2016 at 8:53 AM
None
5.1.1
Andrea Boriero
changed the AssigneeMarch 30, 2016 at 8:53 AM
Unassigned
Andrea Boriero
benoit besson
updated the DescriptionMarch 25, 2016 at 10:22 PM
See : https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/main/java/org/hibernate/tool/schema/internal/SchemaCreatorImpl.java#L357 The generation of the Foreign key constraint shall be filtered with foreign key table according to its table namespace, as done to create schema objects. It can be achieved the same way : {code:java} //NOTE : Foreign keys must be created *after* all tables of all namespaces for cross namespace fks. see HHH-10420 for ( Namespace namespace : database.getNamespaces() ) { // NOTE : Foreign keys must be created *after* unique keys for numerous DBs. See HHH-8390 * if ( !schemaFilter.includeNamespace( namespace ) ) { continue; }* for ( Table table : namespace.getTables() ) { {code}
See : https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/main/java/org/hibernate/tool/schema/internal/SchemaCreatorImpl.java#L357 The generation of the Foreign key constraint shall be filtered with foreign key table according to its table namespace, as done to create schema objects. It can be achieved the same way : {code:java} //NOTE : Foreign keys must be created *after* all tables of all namespaces for cross namespace fks. see HHH-10420 for ( Namespace namespace : database.getNamespaces() ) { // NOTE : Foreign keys must be created *after* unique keys for numerous DBs. See HHH-8390 if ( !schemaFilter.includeNamespace( namespace ) ) { continue; } for ( Table table : namespace.getTables() ) { {code}
benoit besson
updated the DescriptionMarch 25, 2016 at 10:21 PM
See : https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/main/java/org/hibernate/tool/schema/internal/SchemaCreatorImpl.java#L357 The generation of the Foreign key constraint shall be filtered with foreign key table according to its table namespace, as done to create schema objects. It can be achieved the same way : {code:java} //NOTE : Foreign keys must be created *after* all tables of all namespaces for cross namespace fks. see HHH-10420 for ( Namespace namespace : database.getNamespaces() ) { // NOTE : Foreign keys must be created *after* unique keys for numerous DBs. See HHH-8390 if ( !schemaFilter.includeNamespace( namespace ) ) { continue; } for ( Table table : namespace.getTables() ) { {code}
See : https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/main/java/org/hibernate/tool/schema/internal/SchemaCreatorImpl.java#L357 The generation of the Foreign key constraint shall be filtered with foreign key table according to its table namespace, as done to create schema objects. It can be achieved the same way : {code:java} //NOTE : Foreign keys must be created *after* all tables of all namespaces for cross namespace fks. see HHH-10420 for ( Namespace namespace : database.getNamespaces() ) { // NOTE : Foreign keys must be created *after* unique keys for numerous DBs. See HHH-8390 * if ( !schemaFilter.includeNamespace( namespace ) ) { continue; }* for ( Table table : namespace.getTables() ) { {code}
benoit besson
updated the DescriptionMarch 25, 2016 at 10:21 PM
See : https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/main/java/org/hibernate/tool/schema/internal/SchemaCreatorImpl.java#L357 The generation of the Foreign key constraint shall be filtered with foreign key table according to its table namespace, as done to create schema objects. It can be achieved the same way : //NOTE : Foreign keys must be created *after* all tables of all namespaces for cross namespace fks. see HHH-10420 for ( Namespace namespace : database.getNamespaces() ) { // NOTE : Foreign keys must be created *after* unique keys for numerous DBs. See HHH-8390 * if ( !schemaFilter.includeNamespace( namespace ) ) { continue; }* for ( Table table : namespace.getTables() ) {
See : https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/main/java/org/hibernate/tool/schema/internal/SchemaCreatorImpl.java#L357 The generation of the Foreign key constraint shall be filtered with foreign key table according to its table namespace, as done to create schema objects. It can be achieved the same way : {code:java} //NOTE : Foreign keys must be created *after* all tables of all namespaces for cross namespace fks. see HHH-10420 for ( Namespace namespace : database.getNamespaces() ) { // NOTE : Foreign keys must be created *after* unique keys for numerous DBs. See HHH-8390 if ( !schemaFilter.includeNamespace( namespace ) ) { continue; } for ( Table table : namespace.getTables() ) { {code}
benoit besson
updated the DescriptionMarch 25, 2016 at 10:21 PM
See : https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/main/java/org/hibernate/tool/schema/internal/SchemaCreatorImpl.java#L357 The generation of the Foreign key constraint shall be filtered with foreign key table according to its table namespace, as done to create schema objects. It can be achieved the same way : //NOTE : Foreign keys must be created *after* all tables of all namespaces for cross namespace fks. see HHH-10420 for ( Namespace namespace : database.getNamespaces() ) { // NOTE : Foreign keys must be created *after* unique keys for numerous DBs. See HHH-8390 *_ if ( !schemaFilter.includeNamespace( namespace ) ) { continue; }_* for ( Table table : namespace.getTables() ) {
See : https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/main/java/org/hibernate/tool/schema/internal/SchemaCreatorImpl.java#L357 The generation of the Foreign key constraint shall be filtered with foreign key table according to its table namespace, as done to create schema objects. It can be achieved the same way : //NOTE : Foreign keys must be created *after* all tables of all namespaces for cross namespace fks. see HHH-10420 for ( Namespace namespace : database.getNamespaces() ) { // NOTE : Foreign keys must be created *after* unique keys for numerous DBs. See HHH-8390 * if ( !schemaFilter.includeNamespace( namespace ) ) { continue; }* for ( Table table : namespace.getTables() ) {
benoit besson
updated the DescriptionMarch 25, 2016 at 10:20 PM
See : https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/main/java/org/hibernate/tool/schema/internal/SchemaCreatorImpl.java#L357 The generation of the Foreign key constraint shall be filtered with foreign key table according to its table namespace, as done to create schema objects. It can be achieved the same way : //NOTE : Foreign keys must be created *after* all tables of all namespaces for cross namespace fks. see HHH-10420 for ( Namespace namespace : database.getNamespaces() ) { // NOTE : Foreign keys must be created *after* unique keys for numerous DBs. See HHH-8390 *_+ if ( !schemaFilter.includeNamespace( namespace ) ) { + continue; + }_* + for ( Table table : namespace.getTables() ) {
See : https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/main/java/org/hibernate/tool/schema/internal/SchemaCreatorImpl.java#L357 The generation of the Foreign key constraint shall be filtered with foreign key table according to its table namespace, as done to create schema objects. It can be achieved the same way : //NOTE : Foreign keys must be created *after* all tables of all namespaces for cross namespace fks. see HHH-10420 for ( Namespace namespace : database.getNamespaces() ) { // NOTE : Foreign keys must be created *after* unique keys for numerous DBs. See HHH-8390 *_ if ( !schemaFilter.includeNamespace( namespace ) ) { continue; }_* for ( Table table : namespace.getTables() ) {
benoit besson
updated the DescriptionMarch 25, 2016 at 10:20 PM
See : https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/main/java/org/hibernate/tool/schema/internal/SchemaCreatorImpl.java#L357 The generation of the Foreign key constraint shall be filtered with foreign key table according to its table namespace, as done to create schema objects. It can be achieved the same way : //NOTE : Foreign keys must be created *after* all tables of all namespaces for cross namespace fks. see HHH-10420 for ( Namespace namespace : database.getNamespaces() ) { // NOTE : Foreign keys must be created *after* unique keys for numerous DBs. See HHH-8390 + if ( !schemaFilter.includeNamespace( namespace ) ) { + continue; + } + for ( Table table : namespace.getTables() ) {
See : https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/main/java/org/hibernate/tool/schema/internal/SchemaCreatorImpl.java#L357 The generation of the Foreign key constraint shall be filtered with foreign key table according to its table namespace, as done to create schema objects. It can be achieved the same way : //NOTE : Foreign keys must be created *after* all tables of all namespaces for cross namespace fks. see HHH-10420 for ( Namespace namespace : database.getNamespaces() ) { // NOTE : Foreign keys must be created *after* unique keys for numerous DBs. See HHH-8390 *_+ if ( !schemaFilter.includeNamespace( namespace ) ) { + continue; + }_* + for ( Table table : namespace.getTables() ) {
benoit besson
created the IssueMarch 25, 2016 at 10:19 PM
Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

Created March 25, 2016 at 10:19 PM
Updated August 12, 2016 at 9:14 PM
Resolved March 30, 2016 at 9:14 AM