aspose file tools*
The moose likes Object Relational Mapping and the fly likes Hibernate in action, Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate in action, "Hello World" example source" Watch "Hibernate in action, "Hello World" example source" New topic
Author

Hibernate in action, "Hello World" example source

Siamak Saarmann
Ranch Hand

Joined: Aug 21, 2004
Posts: 78
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


PhD Artificial Intelligence, OCJP1.6
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

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 ]

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Siamak Saarmann
Ranch Hand

Joined: Aug 21, 2004
Posts: 78
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

Joined: Apr 14, 2004
Posts: 10336

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 ]
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: Hibernate in action, "Hello World" example source