Looks like I'm getting an AssertionFailure on a rather simple mapping. Before escalating this to JIRA or whatever, is there anything obvious I'm doing wrong?
Hibernate version: 1.0
Mapping documents:
Code:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0">
<class name="Abcdefg.Budget, Abcdefg.Library" table="customer_budget">
<id name="Id" column="budget_id" unsaved-value="0">
<generator class="identity"/>
</id>
<property name="Year" column="budget_year"/>
<joined-subclass name="Abcdefg.CustomerBudget, Abcdefg.Library" table="customer_budget">
<key column="budget_id"/>
<many-to-one name="Customer" class="Abcdefg.Customer, Abcdefg.Labels" />
</joined-subclass>
<joined-subclass name="Abcdefg.MiscBudget, Abcdefg.Library" table="budget_misc">
<key column="budget_id"/>
<property column="Practice" name="Practice" type="String"/>
<property column="Platform" name="Platform" type="String"/>
</joined-subclass>
</class>
</hibernate-mapping>
Full stack trace of any exception that occurs:Code:
at NHibernate.Mapping.Subclass.CreateForeignKey()
at NHibernate.Cfg.Binder.BindJoinedSubclass(XmlNode node, Subclass model, Mappings mappings)
at NHibernate.Cfg.Binder.PropertiesFromXML(XmlNode node, PersistentClass model, Mappings mappings)
at NHibernate.Cfg.Binder.BindRootClass(XmlNode node, RootClass model, Mappings mappings)
at NHibernate.Cfg.Binder.BindRoot(XmlDocument doc, Mappings model)
at NHibernate.Cfg.Configuration.AddValidatedDocument(XmlDocument doc)
at NHibernate.Cfg.Configuration.AddInputStream(Stream xmlInputStream)
Debug level Hibernate log excerpt: Code:
2005-12-29 11:07:34,185 [6056] INFO NHibernate.Cfg.Configuration - Found mapping documents in assembly: Budget.hbm.xml
2005-12-29 11:07:34,185 [6056] INFO NHibernate.Dialect.Dialect - Using dialect: NHibernate.Dialect.MsSql2000Dialect
2005-12-29 11:07:34,185 [6056] INFO NHibernate.Cfg.Binder - Mapping class: Abcdefg.Budget -> customer_budget
2005-12-29 11:07:34,185 [6056] DEBUG NHibernate.Cfg.Binder - Mapped property: Id -> budget_id, type: Int32
2005-12-29 11:07:34,185 [6056] DEBUG NHibernate.Cfg.Binder - Mapped property: Year -> budget_year, type: Int32
2005-12-29 11:07:34,185 [6056] INFO NHibernate.Cfg.Binder - Mapping joined-subclass: Abcdefg.CustomerBudget -> customer_budget
2005-12-29 11:07:34,185 [6056] ERROR NHibernate.AssertionFailure - An AssertionFailure occured - this may indicate a bug in NHibernate
NHibernate.AssertionFailure: Not a joined-subclass
2005-12-29 11:07:34,201 [6056] ERROR NHibernate.Cfg.Configuration - Could not configure datastore from input stream
NHibernate.AssertionFailure: Not a joined-subclass
at NHibernate.Mapping.Subclass.CreateForeignKey()
at NHibernate.Cfg.Binder.BindJoinedSubclass(XmlNode node, Subclass model, Mappings mappings)
at NHibernate.Cfg.Binder.PropertiesFromXML(XmlNode node, PersistentClass model, Mappings mappings)
at NHibernate.Cfg.Binder.BindRootClass(XmlNode node, RootClass model, Mappings mappings)
at NHibernate.Cfg.Binder.BindRoot(XmlDocument doc, Mappings model)
at NHibernate.Cfg.Configuration.AddValidatedDocument(XmlDocument doc)
at NHibernate.Cfg.Configuration.AddInputStream(Stream xmlInputStream)