New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated to Hibernate 5.0.7 #1429

Merged
merged 3 commits into from Jan 28, 2016

Conversation

Projects
None yet
4 participants
@ant3
Contributor

ant3 commented Jan 25, 2016

Hibernate 5 has been out for a while; there are a few patch releases and it seems fairly stable, so I updated the dropwizard-hibernate module to use Hibernate 5.

This is a big advantage to people who want to use Java 8 time classes such as Instant, because they won't have to include extra Jadira jars to make hibernate persist the new types. I'm not aware of any downside since those not using Java 8 can still use the Jadira support for Joda time etc. as before.

@jplock jplock added the improvement label Jan 26, 2016

@jplock jplock added this to the 1.0.0 milestone Jan 26, 2016

@ant3

This comment has been minimized.

Show comment
Hide comment
@ant3

ant3 Jan 26, 2016

Contributor

Happy to make changes, but will wait for feedback before committing.

Contributor

ant3 commented Jan 26, 2016

Happy to make changes, but will wait for feedback before committing.

@ant3

This comment has been minimized.

Show comment
Hide comment
@ant3

ant3 Jan 27, 2016

Contributor

Well I made the changes anyway - but happy to adjust if there are further comments.

Contributor

ant3 commented Jan 27, 2016

Well I made the changes anyway - but happy to adjust if there are further comments.

joschi added a commit that referenced this pull request Jan 28, 2016

Merge pull request #1429 from ant3/master
Updated to Hibernate 5.0.7

@joschi joschi merged commit f4032da into dropwizard:master Jan 28, 2016

@joschi

This comment has been minimized.

Show comment
Hide comment
@joschi

joschi Jan 28, 2016

Member

LGTM. Thanks!

Member

joschi commented Jan 28, 2016

LGTM. Thanks!

@joschi joschi self-assigned this Jan 28, 2016

joschi added a commit that referenced this pull request Jan 28, 2016

@alexitooi

This comment has been minimized.

Show comment
Hide comment
@alexitooi

alexitooi Sep 16, 2016

hi @ant3,
unfortunately we have found a downside of upgrading hibernate from 4.x to 5.x in dropwizard!
we have been using an identifier generator which is removed in hibernate 5.x and so far we could not figure out a way on how to make our existing db work with the new identifier generators :(
we used the "hilo" strategy which hibernate implemented with "org.hibernate.id.TableHiLoGenerator" (creates a table with the next_hi value) and it seems that we can not migrate this...do you have any hints? is there probably a fork of DW 1.0 with hibernate 4.x ?

alexitooi commented Sep 16, 2016

hi @ant3,
unfortunately we have found a downside of upgrading hibernate from 4.x to 5.x in dropwizard!
we have been using an identifier generator which is removed in hibernate 5.x and so far we could not figure out a way on how to make our existing db work with the new identifier generators :(
we used the "hilo" strategy which hibernate implemented with "org.hibernate.id.TableHiLoGenerator" (creates a table with the next_hi value) and it seems that we can not migrate this...do you have any hints? is there probably a fork of DW 1.0 with hibernate 4.x ?

@ant3

This comment has been minimized.

Show comment
Hide comment
@ant3

ant3 Sep 17, 2016

Contributor

So you were using https://docs.jboss.org/hibernate/orm/4.1/javadocs/org/hibernate/id/TableHiLoGenerator.html. I haven't used it myself, but the javadoc for hibernate version 4.1 has it marked as deprecated. The link above suggests that you should move to using SequenceStyleGenerator (even in Hibernate 4.1). This class still exists in Hibernate 5 - https://docs.jboss.org/hibernate/orm/5.2/javadocs/org/hibernate/id/enhanced/SequenceStyleGenerator.html.

Is there any reason that you cannot use SequenceStyleGenerator?

Contributor

ant3 commented Sep 17, 2016

So you were using https://docs.jboss.org/hibernate/orm/4.1/javadocs/org/hibernate/id/TableHiLoGenerator.html. I haven't used it myself, but the javadoc for hibernate version 4.1 has it marked as deprecated. The link above suggests that you should move to using SequenceStyleGenerator (even in Hibernate 4.1). This class still exists in Hibernate 5 - https://docs.jboss.org/hibernate/orm/5.2/javadocs/org/hibernate/id/enhanced/SequenceStyleGenerator.html.

Is there any reason that you cannot use SequenceStyleGenerator?

@alexitooi

This comment has been minimized.

Show comment
Hide comment
@alexitooi

alexitooi Sep 23, 2016

hi, yeah we realized that just now that it was deprecated...unfortunately we don't see a way to migrate to the newly introduced generators since also hibernate user guide states in one hidden sentence it is not compatible. do you might know of a fork of DW with hibernate 4.X in place?

alexitooi commented Sep 23, 2016

hi, yeah we realized that just now that it was deprecated...unfortunately we don't see a way to migrate to the newly introduced generators since also hibernate user guide states in one hidden sentence it is not compatible. do you might know of a fork of DW with hibernate 4.X in place?

@ant3

This comment has been minimized.

Show comment
Hide comment
@ant3

ant3 Sep 23, 2016

Contributor

I'm not aware of a fork. You can of course use the older version, or create your own fork, but I would be surprised if there is no way for you to migrate. Which 'hidden sentence' are you talking about?

Contributor

ant3 commented Sep 23, 2016

I'm not aware of a fork. You can of course use the older version, or create your own fork, but I would be surprised if there is no way for you to migrate. Which 'hidden sentence' are you talking about?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment