Is there a way to map an Entity class (Address.java) to MySQL without using Hibernate Mapping (.hbm files)
What i need to do is to Create a table called ‘Address’ in the MySQL DB, and create Columns with the attributes of this class, and later populate them.
But i need to do it without writing Hibernate mapping files (The .hbm files).
Persistence is one way of doing it, If so can someone tell me how to do it ?
Use annotations instead of XML: http://docs.jboss.org/hibernate/annotations/3.5/reference/en/html_single/#entity-overview
In your case, you would start by annotating the
Addressclass with@Entity: