Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate in action, "Hello World" example source

 
Siamak Saarmann
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am sorry to say this but before I see a running example I won't believe hundreds of "Hello World" examples.

Would someone please forward me to a source code of Chapter2 "hello world" example.

Source code is not complete in text book and I can not get it running. I asked this in hibernate forums but it seems no one has the source code there.

Regards,
Mac
programmernet.org
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Chapter 2 of which book? If you mean "Hibernate In Action", then the source code is printed in the book. If you mean another book then I can't help.
[ April 01, 2005: Message edited by: Paul Sturrock ]
 
Siamak Saarmann
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul,

Printed source is not the complete source code of the example. Parts of code are printed between lines of the article.

I am not able to put things together correctly and I am not able to run it.

Mac
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah, so you do mean Hibernate In Action. True the source code is not 100% there, but all that you need to know about Hibernate to run this example is. You have:
  • Message - your persistent class
  • Message.hbm.xml - the mapping file for that class
  • A snippet of code showing you how to open a Session and query for a Message
  • A snippet of code showing you how to update a Message

  • Further on in the chapter you have "Basic Configuration" which tells you how to configure your SessionFactory.

    Which part of this is causing you problems? Perhaps you can post the code you have written so far and someone might be able to spot where you are going wrong. You could also say which part of this is not clear to you and perhaps someone will take the time to explain it.
    [ April 01, 2005: Message edited by: Paul Sturrock ]
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic