19. How do you map Java Objects with Database tables

  • Write Java domain objects (beans with setter and getter).e.g class Keyword
  • Write hbm.xml, where we map java class to table and database columns to Java class variables.

Find the example below

http://www.java2s.com/Code/Java/Hibernate/SimpleSaveDemo.htm

No comments:

Post a Comment