Skip to content
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

upgrade hibernate to 5.3.x #1263

Closed
dreamingo88 opened this issue Sep 7, 2018 · 11 comments
Closed

upgrade hibernate to 5.3.x #1263

dreamingo88 opened this issue Sep 7, 2018 · 11 comments
Labels
Milestone

Comments

@dreamingo88
Copy link

is there any plan to upgrade hibernate to 5.3.x

@tomparle
Copy link
Contributor

tomparle commented Sep 8, 2018

Hi,
I do not think there is such a plan currently, but libraries are regularly upgraded.
Is there any specific purpose for this upgrade ? What is your need ?
By the way, I think you should be able to use your own Hibernate lib by specifying it in your dependencies.conf file.

@asolntsev
Copy link
Contributor

@tomparle Unfortunately, it's not possible. The problem is that Play1 uses a "hacked" version of hibernate.jar

See files:

So, in order to update hibernate, you need to checkout sources, apply the patch, build a new hibernate jar and commit it to Play1. It's not impossible, but it's weird. :(

@tomparle
Copy link
Contributor

tomparle commented Sep 8, 2018

@asolntsev oh, I forgot about the Hibernate patch, my bad. Thank you for pointing this out and for the explainations to patch it manually.

@flybyray
Copy link
Contributor

We already use the newest hibernate with play.
We need to use hibernate feature to use SecondaryTables to integrate with legacy databases which split up data into multiple tables (without using onetoone workarrounds). the legacy databases should never be modified (and if possible hibernate should even respect that in ddl update mode).
actually there was a bug in hibernate HHH-8805 for secondary tables which is fixed only in newest version.

@asolntsev
Copy link
Contributor

@flybyray Can you describe how exactly you did it? How is it possible to use latest hibernate.jar in a play application?

@flybyray
Copy link
Contributor

flybyray commented Sep 11, 2018

scm checkout hibernate sources, applying patches (some need adjustments for the current source of hibernate but not difficult, there are just line movements), than build hibernate. voila there is the jar. i am not sure if i have time to precisly describe it.

Update --- forgot it --- i pushed the patches and fixes here
maybe kept the 5.2.x branch
synapplix/hibernate-orm@9ca81d6

need to check that with another development branch at work ( i think we used the 5.3.x there )

@flybyray
Copy link
Contributor

Ok I will provide the details. In that case i struggled with the current state of Play1 dependencies. It looks a little bit confused. #1265
The hibernate-entitmanager is not referenced in dependencies yml.

@flybyray
Copy link
Contributor

flybyray commented Sep 12, 2018

That would be the current patch file https://gist.github.com/flybyray/35c1cde8655e65a49e4e14296c74c5a5
for hibernate 5.3.6 (hibernate fork pushed to synapplix/hibernate-orm@8ecee3c)

play1 needs 2 additional libraries from hibernate dependencies. Which are not optional in classic use case (without osgi).
I added therefore:
- net.bytebuddy -> byte-buddy 1.8.17
- javax.persistence -> javax.persistence-api 2.2

to the dependencies.yml and the library folder.
see:

flybyray added a commit to synapplix/play1 that referenced this issue Sep 12, 2018
@flybyray
Copy link
Contributor

#1266

@flybyray
Copy link
Contributor

So, in order to update hibernate, you need to checkout sources, apply the patch, build a new hibernate jar and commit it to Play1. It's not impossible, but it's weird. :(

It is quite easy with the right tools. With intellij applying an old patch file will be like a merge conflict resolution process: http://www.screencast.com/t/ZXTDCsEELUi

xael-fry added a commit that referenced this issue Oct 24, 2018
sample upgrade for issue #1263: upgrade to hibernate 5.3.6
@xael-fry xael-fry added this to the 1.5.2 milestone Oct 26, 2018
@xael-fry
Copy link
Member

Merged #1266
thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants