56 lines
2.4 KiB
XML
Executable File
56 lines
2.4 KiB
XML
Executable File
<?xml version="1.0" encoding="utf-8"?>
|
|
<!--
|
|
XML based configuration file for TriggerModel. This is set to eager loading (lazy="false") as by the time we return
|
|
the data via WCF the session is closed and it causes a crash.
|
|
|
|
This also includes multiple other trigger classes as joined-subclass. This is due to them being a child class of TriggerModel. This will
|
|
result in each trigger type having its own table which links to TriggerModel. TriggerModel will contain all common data and each other table will
|
|
contain the bespoke information for that trigger.
|
|
|
|
@see RSG.Pipeline.Automation.Database.Domain.Entities.Triggers.TriggerModel
|
|
-->
|
|
<hibernate-mapping assembly="RSG.Pipeline.Automation.Database.Domain" namespace="RSG.Pipeline.Automation.Database.Domain.Entities.Triggers" xmlns="urn:nhibernate-mapping-2.2" >
|
|
<class name="TriggerModel" table="Triggers" abstract="true">
|
|
<!-- BaseModel Properties -->
|
|
<id name="TriggerId" type="guid">
|
|
<generator class="assigned" />
|
|
</id>
|
|
|
|
<property name="TriggeredAt" />
|
|
|
|
<!-- Changelist Trigger -->
|
|
<joined-subclass name="ChangelistTriggerModel" table="ChangelistTriggers">
|
|
<key column="TriggerId" />
|
|
<property name="Changelist" />
|
|
<property name="Description" type="StringClob">
|
|
<column name="Description" sql-type="TEXT"/>
|
|
</property>
|
|
<property name="Username" />
|
|
<property name="Client" />
|
|
|
|
<set name="MonitoredPaths" table="MonitoredPaths" lazy="false" fetch="select">
|
|
<key column="TriggerId"/>
|
|
<element column="Path" type="System.String"/>
|
|
</set>
|
|
|
|
<array name="Files" table="Files" fetch="select">
|
|
<key column="TriggerId"/>
|
|
<index column="IndexNr" type="System.Int32"/>
|
|
<element column="Path" type="System.String"/>
|
|
</array>
|
|
</joined-subclass>
|
|
|
|
<!-- Changelist Trigger -->
|
|
<joined-subclass name="UserRequestTriggerModel" table="UserRequestTriggers">
|
|
<key column="TriggerId" />
|
|
<property name="Username" />
|
|
<property name="FormattedCommand" />
|
|
<property name="Description" />
|
|
<array name="Files" table="Files">
|
|
<key column="TriggerId"/>
|
|
<index column="IndexNr" type="System.Int32"/>
|
|
<element column="Path" type="System.String"/>
|
|
</array>
|
|
</joined-subclass>
|
|
</class>
|
|
</hibernate-mapping> |