• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

quick hibernate question

 
Ranch Hand
Posts: 229
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi I am new to hibernate, since which version has hibernate implemented annotation? When annotation is used, does it mean you longer need to create mapping files? Thanks.
 
author and cow tipper
Posts: 5009
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
With a JDK of version 5, aka 1.5 or better, you're good to go with annotations. Just download the Hibernate Core module and the Hibernate annotations module from hibernate.org, and you'll be up and running in no time.

Annotations do eliminate the need for the mapping files, which in my opinion, makes persistence modelling easier and more natural.

Please take a look at this Hibernate3 tutorial that demonstrates how to get up and running with Hibernate and JPA annotations. It's pretty thorough.

Setting up a Hibernate Environment for Data Persistence with Java

Don't struggle too much. When you've got another question, or you're having a problem, post to the ranch.

-Cameron McKenzie
 
Tony Smith
Ranch Hand
Posts: 229
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When you say: makes persistence modelling easier and more natural. Why is that? Is that because you think xml files are easier to read through or? Do you make mapping first then create the tables? Is that what you mean by persistence modelling?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic