Revision: 163
http://svn.sourceforge.net/nmailserver/?rev=163&view=rev
Author: tmyroadctfig
Date: 2007-03-03 21:29:38 -0800 (Sat, 03 Mar 2007)
Log Message:
-----------
Added some NHibernate calendar stuff.
Added Paths:
-----------
NMail/trunk/NMail.LocalStoreData.MySql/Properties/
NMail/trunk/NMail.LocalStoreData.MySql/Resources/
NMail/trunk/NMail.LocalStoreData.MySql/Resources/NMail.LocalStoreData.MySql.hbm.xml
NMail/trunk/NMail.LocalStoreData.MySql/Resources/hibernate-configuration.xml
Added: NMail/trunk/NMail.LocalStoreData.MySql/Resources/NMail.LocalStoreData.MySql.hbm.xml
===================================================================
--- NMail/trunk/NMail.LocalStoreData.MySql/Resources/NMail.LocalStoreData.MySql.hbm.xml (rev 0)
+++ NMail/trunk/NMail.LocalStoreData.MySql/Resources/NMail.LocalStoreData.MySql.hbm.xml 2007-03-04 05:29:38 UTC (rev 163)
@@ -0,0 +1,131 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="NMail" assembly="NMail" default-lazy="false">
+ <!--
+ -
+ - Calendar
+ -
+ -->
+ <class name="NMail.DataTypes.Calendar.Calendar" table="Calendar">
+ <id name="CalendarId" type="Int32" unsaved-value="0">
+ <column name="CalendarId" not-null="true"/>
+ <generator class="native" />
+ </id>
+
+ <property name="Name" not-null="true"/>
+
+ <!-- TODO: make this a many to one relationship with folder -->
+ <property name="ParentFolderId" />
+
+ <!-- TODO: make this a many to one relationship with user -->
+ <property name="OwnerUserId" />
+
+ <list name="Entries" cascade="all">
+ <key column="CalendarEntryId" />
+ <index column="CategoryEntryIndex" type="Int32" />
+ <one-to-many class="NMail.DataTypes.Calendar.CalendarEntry" />
+ </list>
+ </class>
+
+ <!--
+ -
+ - Calendar Entry
+ -
+ -->
+ <class name="NMail.DataTypes.Calendar.CalendarEntry" table="CalendarEntry">
+ <id name="EntryId" type="Int32" unsaved-value="0">
+ <column name="CalendarEntryId" not-null="true"/>
+ <generator class="native" />
+ </id>
+
+
+ <!--
+ - Descriptive Properties
+ -->
+ <property name="Classification" not-null="true" />
+
+ <list name="Categories" table="CalendarEventCategories" cascade="all">
+ <key column="CalendarEntryId" />
+ <index column="CategoryIndex" type="Int32" />
+ <element column="Category" type="String" />
+ </list>
+
+ <property name="Description" />
+
+ <!--<property name="Status" />-->
+
+ <property name="Summary" />
+
+
+ <!--
+ - Date/Time Properties
+ -->
+ <property name="StartTime" not-null="true" />
+
+
+ <!--
+ - Relationship Component Properties
+ -->
+ <list name="Attendees" cascade="all">
+ <key column="CalendarEntryId" />
+ <index column="AttendeeIndex" />
+ <one-to-many class="NMail.DataTypes.Calendar.Attendee" />
+ </list>
+
+ <property name="Organiser" type="String" />
+
+ <!-- TODO: make this a many to one relationship with user -->
+ <property name="OwnerUserId" />
+
+ <many-to-one name="Calendar"
+ class="NMail.DataTypes.Calendar.Calendar"
+ column="CalendarId" />
+
+
+ <!--
+ - Recurrence Component Properties
+ -->
+
+ <!-- one to many <property name="Recurrence" /> -->
+
+ <property name="RecurrenceId" />
+
+
+ <!--
+ - Change Management Component Properties
+ -->
+ <property name="Created" />
+
+ <property name="TimeStamp" />
+
+ <property name="LastModified" />
+
+ <property name="Sequence" />
+
+ <!--
+ -
+ - Calendar Event
+ -
+ -->
+ <joined-subclass name="NMail.DataTypes.Calendar.EventEntry" table="EventEntry">
+ <key column="CalendarEntryId"/>
+ </joined-subclass>
+ </class>
+
+ <!--
+ -
+ - Attendee
+ -
+ -->
+ <class name="NMail.DataTypes.Calendar.Attendee" table="Attendee">
+ <id type="Int32">
+ <column name="AttendeeId" not-null="true"/>
+ <generator class="native" />
+ </id>
+
+ <property name="Address" not-null="true"/>
+
+ <many-to-one name="CalendarEntry"
+ class="NMail.DataTypes.Calendar.CalendarEntry"
+ column="CalendarEntryId" />
+ </class>
+</hibernate-mapping>
\ No newline at end of file
Added: NMail/trunk/NMail.LocalStoreData.MySql/Resources/hibernate-configuration.xml
===================================================================
--- NMail/trunk/NMail.LocalStoreData.MySql/Resources/hibernate-configuration.xml (rev 0)
+++ NMail/trunk/NMail.LocalStoreData.MySql/Resources/hibernate-configuration.xml 2007-03-04 05:29:38 UTC (rev 163)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
+ <session-factory>
+ <property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
+ <property name="connection.driver_class">NHibernate.Driver.MySqlDataDriver</property>
+ <property name="connection.connection_string">Database=NMailLocalStore;Uid=NMail;Password=moo</property>
+ <property name="dialect">NHibernate.Dialect.MySQLDialect</property>
+ </session-factory>
+</hibernate-configuration>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|