From: <sc...@hy...> - 2009-07-02 01:25:55
|
Author: scottmf Date: 2009-07-01 17:21:25 -0700 (Wed, 01 Jul 2009) New Revision: 13447 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=13447 Modified: branches/HQ_4_1/sql/events/TriggerEvent.hbm.xml Log: hibernate gets confused due to the duplicate property on the composite index. Need to specify more attrs so it is happy. Also added caching info. Modified: branches/HQ_4_1/sql/events/TriggerEvent.hbm.xml =================================================================== --- branches/HQ_4_1/sql/events/TriggerEvent.hbm.xml 2009-07-02 00:07:24 UTC (rev 13446) +++ branches/HQ_4_1/sql/events/TriggerEvent.hbm.xml 2009-07-02 00:21:25 UTC (rev 13447) @@ -2,9 +2,10 @@ <hibernate-mapping package="org.hyperic.hq.events.server.session"> <!-- We prevent concurrent updates at the application level. Each trigger - reads then updates event objects serially with an exclusive lock. Thus, - we don't need an optimistic locking strategy and the associated overhead. --> + reads then updates event objects serially with an exclusive lock. Thus, + we don't need an optimistic locking strategy and the associated overhead. --> <class name="TriggerEvent" table="EAM_TRIGGER_EVENT" optimistic-lock="none"> + <cache usage="read-write"/> <id name="id" type="long"> <column name="ID" not-null="true"/> <generator class="org.hyperic.hibernate.id.ComboGenerator"> @@ -15,8 +16,8 @@ <properties name="measurementId" unique="false"> <property name="triggerId" type="integer"> <column name="TRIGGER_ID" not-null="true" index="TRIGGER_EVENT_TRIGGER_ID_IDX"/> - </property> - <property name="id" index="TRIGGER_EVENT_TRIGGER_ID_IDX"/> + </property> + <property name="id" column="ID" update="false" insert="false" index="TRIGGER_EVENT_TRIGGER_ID_IDX"/> </properties> <property lazy="true" name="eventObject" type="binary"> @@ -33,4 +34,3 @@ </class> </hibernate-mapping> - |