I'm really stumped by this one. It's unable to map to the Int32 class, which I'd've thought was be built in.
It didn't really break after I changed much, save for implementing an additional class which I removed, and re-added but alas to no avail.
Before you ask, this is set to an embedded resource, and I have tested it in isolation to eliminate problems, and tried JournalID as an Int64 and Int32.
nHibernate version: 1.2
Mapping documents:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
<class name="SpongeLibrary.JournalEntry, SpongeLibrary" table="Journal">
<id name="JournalID" type="Int64" unsaved-value="0">
<generator class="native" />
</id>
<many-to-one name="ProjectID" not-null="true"/>
<property name="StartDate" type="DateTime"/>
<property name="EndDate" type="DateTime"/>
<property name="EntryEmployee" type="Int32"/>
<property name="AssignedEmployee" type="Int32"/>
<property name="EntryType" type="SpongeLibrary.EntryTypes, SpongeLibrary"/>
<property name="DateSemantics" type="SpongeLibrary.DateSemanticsOptions, SpongeLibrary"/>
<property name="Status" type="Int32"/>
<property name="Comment" type="String" length="8000"/>
<property name="Historical" type="Boolean"/>
<joined-subclass name="SpongeLibrary.InvoiceEntry, SpongeLibrary" table="JournalInvoice">
<key column="JournalID" />
<property name="InvoiceCode" type="String" length="20"/>
</joined-subclass>
</class>
</hibernate-mapping>
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
Name and version of the database you are using: SQL Server Compact Edition 3.5
The generated SQL (show_sql=true): N/A
Debug level Hibernate log excerpt:
0 [9] INFO NHibernate.Cfg.Configuration (null) - checking mappings queue
10062 [9] INFO NHibernate.Cfg.Configuration (null) - processing one-to-many association mappings
10062 [9] INFO NHibernate.Cfg.Configuration (null) - processing one-to-one association property references
10062 [9] INFO NHibernate.Cfg.Configuration (null) - processing foreign key constraints
10062 [9] DEBUG NHibernate.Cfg.Configuration (null) - resolving reference to class: JournalEntry
10063 [9] DEBUG NHibernate.Cfg.Configuration (null) - resolving reference to class: Int32
10064 [9] ERROR NHibernate.Cfg.Configuration (null) - An association from the table Journal refers to an unmapped class: Int32
Problems with Session and transaction handling?
Read this:
http://hibernate.org/42.html