Hi Brett,
Thanks for following up on this. My comments below.
On Fri, Apr 5, 2013 at 6:44 PM, Brett Meyer <brmeyer(a)redhat.com> wrote:
Here's what I'd like to do. In 4.1.x, all of the unique
constraint/index/column changes from HHH-7797 [1] and the random constraint names in
HHH-1904 [2] will be reverted. When we originally started working on them, they
weren't intended to be this complex. We'll cut a new 4.1.x release.
Sounds the best thing to do.
Regarding the concern brought up in HHH-8092 [3] (constraints
re-generated in schema update, even if they exist): Defaulting to unique constraints, as
opposed to indexes or unique columns, was the best route and most widely supported. As
discussed, it's difficult and un-reliable to attempt to find existing constraints
prior to updating. And remember that schema generation was never meant to be used for
production environments -- supporting every single use case and situation is impossible.
Here is where I don't follow you because "update" mode is very widely
used, especially in development environments but probably also in
production.
My 2 cents:
- You can't have a behaviour where you have a ton of SQL error
messages at each startup. The way it worked before was a better
compromise IMHO: the unique constraints were created only at table
creation. It wasn't perfect but was the best compromise we can find
IMHO, when you are in update mode.
- You can't publish a maintenance release with a major change in the
naming scheme. Releasing it as a 4.2.0 sounds sane. BUT you have to
clearly mention it in the release notes with all the problems it can
cause to the users. And perhaps provide guidance on how to update
without too much pain.
As a long time Hibernate user trying to keep up with the releases to
provide feedback from the field to the Hibernate (and Search) team as
soon as possible (and sometimes fixing bugs), I was quite surprised by
this change and I would have liked to be warned in the release
announcement.
HTH
--
Guillaume