Java Hibernate Tutorial Part 7 - Insert record (object)

Java Hibernate Tutorial Part 7 - Insert record (object)

Patrick WashingtonDC

14 лет назад

89,703 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Patrick Tolentino
Patrick Tolentino - 07.12.2014 07:21

excellent tutorial! very easy to understand and follow. you are a blessing :)

Ответить
Miloud El Assri
Miloud El Assri - 06.01.2014 23:24

Very excellent tutorial. great job Patrick!!!!!!!!!!!!!

Ответить
Kumar Rohit
Kumar Rohit - 21.09.2013 00:04

Seriously amazing! :)

Ответить
Govardhan Hazare
Govardhan Hazare - 20.05.2013 08:07

Thank you .. very useful information..

Ответить
Shanika Sarathchandra
Shanika Sarathchandra - 23.03.2013 01:57

Nice series of lesson. Clean, structured and easy to understand. Thank you sir

Ответить
Sanjay Nayak
Sanjay Nayak - 09.01.2013 00:03

very good session on hibernate.thanks :)

Ответить
Sanjay Nayak
Sanjay Nayak - 09.01.2013 00:01

that line is used to create table in derby database , in this test class he is only inserting column data in the already created table with column name empId,empName. that's why he has commented out that particular line

Ответить
Nguyễn Trung Thành
Nguyễn Trung Thành - 10.08.2012 08:31

Hello, well, I think that line was used for creating the Employee schema, and we just need to do it once. Then, it is not nescessary any more because the schema is already in the real DB now. So, comment that line. :-)

Ответить
Sahil Rally
Sahil Rally - 10.06.2012 17:26

config.buidSessionFactory() seems depreciated......What needs to be used instead now ???

Ответить
Sahil Rally
Sahil Rally - 10.06.2012 17:15

Awesome :-) Thanks from India. May your all wishes comes true.

Ответить
Lukasz Lyczba
Lukasz Lyczba - 03.06.2012 01:17

This guy does great job...

Ответить
Wen C
Wen C - 18.05.2012 00:09

Hi Patrick, I got an exception when I insert the object Alex. Exception in thread "main" java.lang.AbstractMethodError: org.postgresql.jdbc2.Jdbc2DatabaseMetaData.supportsGetGeneratedKeys()Z at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:123) org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867) ...................... at com.hibernate.chapter1.TestEmployee.main(TestEmployee.java:23) Can you tell me what's wrong? Thank you!

Ответить
Mehdi Armachi
Mehdi Armachi - 30.11.2011 18:01

@MissTechniverse Hey ! I've noticed that you have the same problem that I have while trying to create a SessionFactory, did figured out how to solve it ? I would really appreciate it :)

Ответить
David Pape
David Pape - 13.10.2011 05:22

Excellent tutorials so far. The hibernate.cfg.xml file i copied had misspelled "class" on the "current_session_context_class" portion which was driving a no currentsessioncontext configured error for anyone else having that problem.

Ответить
Mallesham Badikala
Mallesham Badikala - 24.07.2011 04:50

hi I have tried this example. It is creating the schema and table, but inserting the record is failing with following exceptions Exception in thread "main" org.hibernate.HibernateException: No CurrentSessionContext configured! at org.hibernate.impl.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:620) at com.atsi.hibernate.ch01.TestEmployee.main(TestEmployee.java:27)

Ответить
Suresh Vkumar
Suresh Vkumar - 05.07.2011 07:43

Wonderful tutorial!

Ответить
Patrick Mulder
Patrick Mulder - 12.06.2011 00:52

I had a "exception in thread “main” org.hibernate.hibernateexception: no currentsessioncontext configured!", it was a typo in the hibernate.cfg.xml incase anybody has the same problem

Ответить
Bhavani Shekhawat
Bhavani Shekhawat - 23.02.2011 00:27

config.buildSessionFactory does not work anymore. It should be replaced by SessionFactory factory = newAnnotationConfiguration().configure().buildSessionFactory();

Ответить
queenme123
queenme123 - 15.11.2010 15:10

hi patrick, I just want to ask, is there any difference if i am using spring mvc3 as framework? thanks. :)

Ответить
Subba Reddy Bhimavarapu
Subba Reddy Bhimavarapu - 01.11.2010 20:10

I like all your Hibernate Videos. I was also able to update and delete records from the table. Could'nt figure out how to select data from a table using this Employee class.

Ответить
Reshu Garg
Reshu Garg - 09.10.2010 20:38

This tutorial really helped me to start from basics of Hibernate... Thanks. Can you provide me Spring video tutorial of same tutor...i would be highly thankful to you,,,,,,

Ответить
ditsaa
ditsaa - 08.09.2010 20:44

this is an amazing tutorial series. thank you!

Ответить