Hibernate SchemaExport does not filter ForeignKey for namespaces and tables
Description
relates to
Activity
Show:
Former user
changed the StatusAugust 12, 2016 at 9:14 PMResolved
Closed
Andrea Boriero
updated the LinkApril 14, 2016 at 3:26 PMNone
This issue relates to HHH-10526
Andrea Boriero
changed the StatusMarch 30, 2016 at 9:14 AMOpen
Resolved
Andrea Boriero
updated the ResolutionMarch 30, 2016 at 9:14 AMNone
Fixed
Andrea Boriero
updated the SummaryMarch 30, 2016 at 8:55 AMHibernate 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 AMNone
5.1.1
Andrea Boriero
changed the AssigneeMarch 30, 2016 at 8:53 AMUnassigned
Andrea Boriero
benoit besson
updated the DescriptionMarch 25, 2016 at 10:22 PMSee : 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 PMSee : 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 PMSee : 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 PMSee : 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 PMSee : 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 PMSee : 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 PMFixed
Details
Details
Assignee
Andrea Boriero
Andrea BorieroReporter
benoit besson
benoit bessonComponents
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
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() ) {