I am getting parsing exception when I add the timestamp fields.
<?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 package="com.bfm.app.dmserver.hibernate"> <class name="Alert" table="dm_alerts"> <composite-id> <!-- A string which uniquely identifies the alert type. Something like "SERVER_DOWN". --> <key-property name="alert" column="alert" /> <!-- empty for alerts that don't relate to a particular server; will be "sam" for alerts MI6Server raises about SAM --> <key-property name="server" column="server" /> <!-- Roughly maps to a Genie icon --> <key-property name="application" column="application" /> <!-- The Aladdin environment (an Aladdin client, BEN, ADMIN...) --> <key-property name="environment" column="environment" /> <!-- The network hostname --> <key-property name="host" column="host" /> <!-- The Aladdin/risk client (For now, the same as environment; may differ in the future, especially for BEN)--> <key-property name="client" column="client" /> </composite-id> <timestamp column="create_time" name="createTime" generated="always"/> <timestamp column="update_time" name="updateTime" generated="always"/> <!-- <property name="createTime" type="java.sql.Timestamp" update="true" insert="true" column="create_time" /> <property name="updateTime" type="java.sql.Timestamp" update="true" insert="true" column="update_time" /> --> <!-- Grouping related alerts together --> <property name="groupId" type="long" column="group_id"/> <!-- A brief human-readable description of the alert's status. --> <property name="summary" type="string" column="summary" /> <!-- A longer description of the alert, along with any available information pertinent to resolving it. (May be XML in the future, but let's treat it as a big block of human-readable text for now.) --> <property name="details" type="string" column="details" length="1000"/> <!-- User inputed comment --> <property name="userComment" type="string" column="userComment" length="1000"/> <!-- "red", "yellow", or "green" --> <property name="severity" type="string" column="severity" /> <!-- owner of the alert creation --> <property name="createdBy" type="string" column="created_by" /> <!-- person or system updated the alert --> <property name="updatedBy" type="string" column="updated_by" /> <!-- Incremented for each alert so you can distinguish between updates with the same timestamp; reset when SAM is restarted, so not reliable for distinguishing between updates with different timestamps. --> <property name="counter" type="int" column="counter" /> <!-- The serial number of the physical device on which the logical host resides --> <property name="device" type="string" column="device" /> <!-- Same as datacenter but in some casses some hosts are located outside the datacenter --> <property name="site" type="string" column="site" /> <!-- Network --> <property name="network" type="string" column="network" /> </class> </hibernate-mapping>
|