I have the following hbm file:
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="com.vaanila.course.Course" table="COURSES">
<meta attribute="class-description">
This class contains the course details.
</meta>
<id name="courseId" type="long" column="COURSE_ID">
<generator class="native"/>
</id>
<property name="courseName" type="string" column="COURSE_NAME" not-null="true" />
<property name="dateTime" type="calendar" column="DATE_TIME" not-null="true" />
</class>
</hibernate-mapping>
When hbm2ddl runs, it creates the course.h2.db file, it creates the COURSES table, and it creates the COURSE_ID and COURSE_NAME columns with types of BIGINT and VARCHAR. But it does not create the DATE_TIME column at all. There is no entry for it. Additionally, when the entire program runs, the console output shows that my program is inserting and updating information (including the DATE_TIME field), but there is no data in the DB when I check it with an external SQL Client.