What is Hibernate Configuration

J

Jan Thomä

What is Hibernate Configuration? diff between xml conf and programtic
conf

Java (cool you got a name like a programming language ;),

generally spoken, Hibernate configuration tells hibernate how to map your
objects to database tables (that's why it's called
object-relational-mapping). Basically you define which members of your
object will be mapped to which columns in the database and which object
type will be put into which table.

The main difference between XML and programmatic configuration is probably
that you can change the XML configuration without recompiling the program
whilst the programmatic configuration (I assume you talk about Hibernate
annotations) requires a recompilation of your program. Apart from that, you
can do the exact same things with both styles of configuration (may someone
correct me if I am wrong on that). I personally prefer doing it with
annotations as you have all the stuff in one place, but depending on your
needs you might opt for doing it the XML-way.


Best regards,
Jan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top