Bug 979103 - [One-off patch] Multiple fixes for Hibernate unique keys and foreign keys in ORM 4.2.0.Final
[One-off patch] Multiple fixes for Hibernate unique keys and foreign keys in ...
Status: CLOSED CURRENTRELEASE
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Hibernate (Show other bugs)
6.1.0
Unspecified Unspecified
unspecified Severity high
: ---
: One-off release
Assigned To: Brett Meyer
Zbyněk Roubalík
:
Depends On: 962421 979098 981720
Blocks: 990362 991581
  Show dependency treegraph
 
Reported: 2013-06-27 11:26 EDT by Ricardo Martinelli de Oliveira
Modified: 2015-09-01 00:00 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
PATCH NAME: BZ-979103 PRODUCT NAME: JBoss Enterprise Application Platform VERSION: 6.1.0 SHORT DESCRIPTION: Multiple fixes for Hibernate unique keys and foreign keys in ORM 4.2.0.Final LONG DESCRIPTION: Multiple fixes for Hibernate unique keys and foreign keys in ORM 4.2.0.Final Identifier too long https://hibernate.atlassian.net/browse/HHH-1904 Configuration#generateSchemaUpdateScript does not create unique constraints https://hibernate.atlassian.net/browse/HHH-8092 Natural IDs generating one UniqueKey per Column https://hibernate.atlassian.net/browse/HHH-8178 Make unique constraint handling on schema update configurable https://hibernate.atlassian.net/browse/HHH-8162 Make generated constraint names short and non-random https://hibernate.atlassian.net/browse/HHH-8217 DenormalizedTable FK constraint names can be too long https://hibernate.atlassian.net/browse/HHH-8269 Incorrect "unique-key" naming comment in docs https://hibernate.atlassian.net/browse/HHH-8273 union-subclass generates bad alter table for unique constraint https://hibernate.atlassian.net/browse/HHH-8275 MANUAL INSTALL INSTRUCTIONS: Backup and remove the following files: $JBOSS_HOME/modules/system/layers/base/org/hibernate/main/hibernate-core-4.2.0.Final-redhat-1.jar $JBOSS_HOME/modules/system/layers/base/org/hibernate/main/module.xml Extract the patched files by either: Using unzip: unzip -d $JBOSS_HOME/ BZ-979103 Or by extracting the files from the zip to the following locations: $JBOSS_HOME/modules/system/layers/base/org/hibernate/main/hibernate-core-4.2.0.Final-redhat-1-BZ-979103.jar $JBOSS_HOME/modules/system/layers/base/org/hibernate/main/module.xml Instructions to uninstall: Restore the following files that were backed up before the patch was installed: $JBOSS_HOME/modules/system/layers/base/org/hibernate/main/hibernate-core-4.2.0.Final-redhat-1.jar $JBOSS_HOME/modules/system/layers/base/org/hibernate/main/module.xml COMPATIBILITY: DEPENDENCIES: JBoss Enterprise Application Platform 6.1.0 SUPERSEDES: SUPERSEDED BY: CREATOR: Brett Meyer DATE: 11 July 2013
Story Points: ---
Clone Of: 979098
Environment:
Last Closed: 2013-07-25 16:11:41 EDT
Type: Support Patch
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
patched hibernate module (3.98 MB, application/download)
2013-06-27 18:52 EDT, Brett Meyer
no flags Details
patched hibernate module (3.99 MB, application/download)
2013-07-11 19:57 EDT, Brett Meyer
no flags Details

  None (edit)
Description Ricardo Martinelli de Oliveira 2013-06-27 11:26:18 EDT
+++ This bug was initially created as a clone of Bug #979098 +++

Hibernate 4.2.0.Final (EAP 6.1.0) included changes to how unique keys and foreign keys were generated (both default to using constraints in "alter table" statements).  Multiple issues were found and fixed in commits spanning 4.2.1.Final to 4.2.3.Final.

This is fairly high priority and should be considered for EAP 6.1.1.  It may affect anyone using schema generation and un-named unique or foreign keys.

https://hibernate.atlassian.net/browse/HHH-1904
https://hibernate.atlassian.net/browse/HHH-8092
https://hibernate.atlassian.net/browse/HHH-8178
https://hibernate.atlassian.net/browse/HHH-8162
https://hibernate.atlassian.net/browse/HHH-8217
https://hibernate.atlassian.net/browse/HHH-8269
https://hibernate.atlassian.net/browse/HHH-8273
https://hibernate.atlassian.net/browse/HHH-8275

--- Additional comment from Brett Meyer on 2013-06-27 11:18:08 EDT ---

Note that there may be some concerns about backward compatability with the fixes.  They do change the strategy used for automatic generation of constraint names.  However, we're specifically fixing issues where this generation was not deterministic in 4.2.0.Final, so it's a moot point.
Comment 2 Brett Meyer 2013-06-27 18:52:13 EDT
Created attachment 766357 [details]
patched hibernate module
Comment 3 Rostislav Svoboda 2013-07-01 04:38:43 EDT
Brett, this looks like real one-off. If you want to have these fixes in EAP 6.1.1 I would suggest to create new BZ and remove eap-6.1.1 flag from this BZ.

it's really confusing - is this BZ meant to be fixed in EAP 6.1.1 ?
Comment 4 Rostislav Svoboda 2013-07-01 04:58:10 EDT
I found https://bugzilla.redhat.com/show_bug.cgi?id=979098 for EAP 6.1.1

I think eap-6.1.1 flag should be removed.
Comment 5 Brett Meyer 2013-07-01 11:49:55 EDT
The eap-6.1.1 has been set automatically, lately -- not sure why.  Removing.
Comment 13 Zbyněk Roubalík 2013-07-08 04:35:59 EDT
Attached zip should countain README file with patching instructions. Could you please add the README file into the zip?

Thank you
Comment 14 Brett Meyer 2013-07-11 19:57:38 EDT
Created attachment 772485 [details]
patched hibernate module
Comment 15 Zbyněk Roubalík 2013-07-17 06:22:33 EDT
No regressions were found and the issue was verified. QA Passed. 

MD5 sum for tested files:
303d93111f3479eedf87fe572a2338f8  BZ-979103.zip
97b3798f16afc2d1043077f528832ed4  hibernate-core-4.2.0.Final-redhat-1-BZ-979103.jar

Note You need to log in before you can comment on or make changes to this bug.