Hibernate Tutorial 03 Part 3- Saving Objects using Hibernate APIs

preview_player
Показать описание
We'll learn how to instantiate Entity objects and save them to the database using Hibernate APIs.
Рекомендации по теме
Комментарии
Автор

Great video! Thank you very much. I've done Hibernate myself in a former job some 7 years ago and have forgotten most of its details. Your videos are very helpful to bring all of them back to me...

bethable
Автор

why can't I like this video more than once

johnloven
Автор

This tutorial was recorded with an older version of Hibernate. This has been deprecated in the newer version. If you are using version 4, you should refer to the documentation about how to build sessionFactory. The concept is the same. Only the API is different. :)

Java.Brains
Автор

Thank you so much sir....Ur way of explanation is really awesome....Even a fresher can become expert in this Hibernate with
your videos...Excellent work sir...U made our life easy..We all love u....Thank you

harikakotta
Автор

Thank you for explaining how Hibernate automatically creates the tables needed. It is interesting to see that you are not using a DAO layer. 

KentOJohnson
Автор

I LOVE your tutorials. They are so helpful.
Please, please keep on the great work.

amsfuy
Автор

Really very useful..great thanks to our E-Master.

maneeshpanwar
Автор

I did it! It worked for me!. I'm using Hibernate4. ErichLancaster posted the right update. 
Also, I'm using sql server 2012. Make sure your connection url is in the format >

and also us as the dialect

Thanks so much Koushik!

tahseenhaque
Автор

Thanks a ton for such excellent tutorials.
I would like to jot down two exceptions I faced while trying out this tutorial with hibernate 5.2, in case someone face the same issues.

1. ConfigurationException: Could not locate cfg.xml resource [hibernate.cfg.xml] in project root folder
2. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'type=MyISAM' at line 1

1. If using Maven, place the cfg.xml file under src/main/resources
2. Change the dialect from to where * can be 5, 55, 57 etc. depending on your mysql installation. The first dialect is for versions 4.0 and earlier

SINHASAMEER
Автор

Kaushik this is just awesome .You are a great teacher dude.

Автор

I thank you very much for your participation in the problem of the deprecated sessionFactory. :) It fixed my app.

LeBadman
Автор

Thank you sir, Its such a nice tutorial with all the basics..Successfully did this first exercise will continue with further :) Thank you :)

sandeeptengale
Автор

I am using Hibernate 4 and the following code worked. Just wanted to share this as the buildSessionFactory() is deprecated

Configuration configuration = new
SessionFactory sessionFactory =

nikhidas
Автор

I have tried with Maven+Hibernate5 with oracle DB(but manually created the table and its structure, hibernate did not create table for me), working fine.But additionally, I had to add javassist.jar

mkkamle
Автор

Check if you have the Apache Commons library added.

Java.Brains
Автор

After 4 hours of fixing errors, I made it. Be patient

musicnevres
Автор

Awesome tutorials...to get a refresher/learn concepts...

allabakashs
Автор

eclipse does not terminate. it keeps running . but it update the db

LifeWithOme
Автор

Update for Hibernate4

Configuration config = new Configuration().configure();
ServiceRegistry serviceRegistry = new
         
SessionFactory sessionFactory =

waqqas_the_wicked
Автор

Awesome Very well explained.... Thanks Kaushik..

hareshsawant