0% found this document useful (0 votes)
54 views2 pages

Hibernate 5: /latest (Every Lab Exercise Comes With Downloadable Source Code)

Hibernate Guide

Uploaded by

Nitesh Jain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views2 pages

Hibernate 5: /latest (Every Lab Exercise Comes With Downloadable Source Code)

Hibernate Guide

Uploaded by

Nitesh Jain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Dear Students,

Although I would request you to use Hibernate 4.3.5.Final version for the duration of the
course, as that was the version used by me while designing the course and the jar files for
which could also be download from Lecture 10, you might still want to use the Hibernate
5.x.y/latest version and you're welcome to do that, but you're going to have to make the
following two changes to the downloaded source code (every lab exercise comes with
downloadable source code) to get your code working properly:

1. Use the GenerationType.IDENTITY1 strategy in your entities for auto id generation. As


shown in the following Message entity, for example:

Copyright 2015 MavenEdge Page 1


2. Build StandardServiceRegistry and Metadata to build the SessionFactory from them in
HibernateUtil class, as shown below:

So if youre going to use Hibernate 4.3.5.Final version, you dont have to make the above
(1st and 2nd) changes to the downloaded source code.

Once you complete the course, you could always test your code using Hibernate
5.x.y/latest version and get back to me in case you happen to face any issues2.

Best,
Deshraj

--------------------------------------------------------------------------------------------------
1
GenerationType.IDENTITY was discussed at
https://www.udemy.com/course/242180/activities/?ids=2594248 in the course
2
Hibernate 5.0.4 version has moved the geronimo-jta_1.1_spec-1.1.1.jar from lib ->
required folder to lib -> osgi folder, so do not forget to have it in the classpath of your
application; Hibernate 5.0.4.Final jar files are also available for download from Lecture 10

Copyright 2015 MavenEdge Page 2

You might also like