• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Where are tutorial source code located for Hibernate ?

 
Sreyan Chakravarty
Ranch Hand
Posts: 65
Firefox Browser MyEclipse IDE Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am unable to find the tutorial sources for the examples referenced in the documentation here (http://docs.jboss.org/hibernate/orm/5.0/manual/en-US/html/ch01.html).

Okay according to this page(http://docs.jboss.org/hibernate/orm/5.0/manual/en-US/html/pr01.html) the tutorials are located on doc/reference/tutorial/ in the project distribution. But there is no such directory when I am downloading the release zip from their site. There is no directory as tutorials/web as referenced in this page(http://docs.jboss.org/hibernate/orm/5.0/manual/en-US/html/ch01.html).

So where are they located ? Why isn't it better documented ?
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sreyan Chakravarty wrote:So where are they located ? Why isn't it better documented ?

If I download the zip file of the 4.3.11.Final release from the Downloads page, I'll find the hibernate-tutorials.zip file in the directory hibernate-release-4.3.11.Final\documentation\quickstart\en-US\html_single\files\
 
Sreyan Chakravarty
Ranch Hand
Posts: 65
Firefox Browser MyEclipse IDE Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Roel De Nijs wrote:
Sreyan Chakravarty wrote:So where are they located ? Why isn't it better documented ?

If I download the zip file of the 4.3.11.Final release from the Downloads page, I'll find the hibernate-tutorials.zip file in the directory hibernate-release-4.3.11.Final\documentation\quickstart\en-US\html_single\files\


Those tutorials do not correspond to the code written over at http://docs.jboss.org/hibernate/orm/5.0/manual/en-US/html_single/#tutorial-firstapp-firstclass. Where is the folder tutorials/web ?
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm pretty sure these tutorials are outdated and if you want to use the tutorials with the same directory structure, you'll probably need to download an old Hibernate version (like version 3.2 or 3.3)
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here you'll find an overview of the code repositories of Hibernate, and more specific the tutorials directory with a web subdirectory. As you can see everything is deleted But if you want, you can still get the source of each file (e.g. the Event class).
 
Sreyan Chakravarty
Ranch Hand
Posts: 65
Firefox Browser MyEclipse IDE Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Roel De Nijs wrote:Here you'll find an overview of the code repositories of Hibernate, and more specific the tutorials directory with a web subdirectory. As you can see everything is deleted But if you want, you can still get the source of each file (e.g. the Event class).


Wow. Thanks I was wondering that whether I was doing something wrong. Thanks I don't know how you knew where to look for the tutorials. One more thing if the documentation is based on an outdated tutorial doesn't that make the documentation outdated and erroneous ?
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sreyan Chakravarty wrote:Thanks I don't know how you knew where to look for the tutorials.

Sometimes Google is really your best friend

Sreyan Chakravarty wrote:One more thing if the documentation is based on an outdated tutorial doesn't that make the documentation outdated and erroneous ?

The tutorial still uses a hibernate mapping file. These xml files were used before Java had annotations (added in 1.5). So although there is no functional difference between both approaches (annotations vs xml files), you could consider xml files as an outdated way of mapping. But many applications will still use them, so it's still used a lot. I prefer to use the annotation style mappings (using JPA instead of Hibernate specific ones).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic