Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 684561
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T01:49:49+00:00 2026-05-14T01:49:49+00:00

I am trying to implement a one-to-many relationship using NHibernate 2.1.2 but keep getting

  • 0

I am trying to implement a one-to-many relationship using NHibernate 2.1.2 but keep getting “Association references unmapped class” exceptions. I have verified that my hbm.xml files are embedded resource. Here are my classes and mappings. Any ideas?

public class OrderStatus
{
    public virtual decimal MainCommit { get; set; }
    public virtual decimal CommitNumber { get; set; }
    public virtual string InvoiceNumber { get; set; }
    public virtual string ShipTo { get; set; }
    public virtual string CustomerOrderNumber { get; set; }
    public virtual string Station { get; set; }
    public virtual DateTime RequestedShipDate { get; set; }
    public virtual decimal EstimatedValue { get; set; }
    public virtual decimal EstimatedWeight { get; set; }
    public virtual string Customer { get; set; }
    public virtual DateTime InvoiceDate { get; set; }
    public virtual ICollection<Promise> Promises { get; set; }
}

<class name="AladdinDb.Models.OrderStatus, AladdinDb" table="vorder_status">
    <id name="CommitNumber" type="decimal" column="commit_no">
        <generator class="assigned">
            <param name="property">
                Plan
            </param>
        </generator>
    </id>
    <property name="MainCommit" column="main_commit" type="decimal" />
    <property name="InvoiceNumber" column="invoice_no" type="string" />
    <property name="ShipTo" column="ship_to" type ="string"/>
    <property name="CustomerOrderNumber" column="cust_order_no" type="string" />
    <property name="Station" column="station" type="string" />
    <property name="RequestedShipDate" column="req_ship_date" type="DateTime" />
    <property name="EstimatedValue" column="estimated_value" type="decimal"/>
    <property name="EstimatedWeight" column="estimated_weight" type="decimal" />
    <property name="Customer" column="customer" type="string" />
    <property name="InvoiceDate" column="invoice_date" />
    <set name="Promises">
        <key column="commit_no"></key>
        <one-to-many class="Promise" />
    </set>
</class>

public class Promise
{
    public virtual decimal CommitNumber { get; set; }
    public virtual DateTime PromiseDate { get; set; }
    public virtual string WhoAsked { get; set; }
    public virtual string WhoGave { get; set; }
    public virtual string Iffy { get; set; }
}

<class name="AladdinDb.Models.Promise, AladdinDb" table="promise">
    <id name="CommitNumber" type="decimal" column="commit_no">
        <generator class="assigned" />
    </id>
    <property name="PromiseDate" column="promise_date" />
    <property name="WhoAsked" column="who_asked" />
    <property name="WhoGave" column="who_gave" />
    <property name="Iffy" column="iffy" />
</class>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T01:49:49+00:00Added an answer on May 14, 2026 at 1:49 am

    You need to use the fully qualified classname in the association, just as in your class mappings.

    Use the assembly and namespace attributes on the hibernate-mapping element if you want to use unqualified class names.

    <set name="Promises">
        <key column="commit_no" />
        <one-to-many class="AladdinDb.Models.Promise, AladdinDb" />
    </set>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to implement some basic linear algebra operations and one of these operations
trying to implement a dialog-box style behaviour using a separate div section with all
I have been trying to implement Win32's MessageBox using GTK. The app uses SDL/OpenGL,
All I am currently trying implement something along the lines of dim l_stuff as
Am trying to implement a generic way for reading sections from a config file.
I am trying to implement string unescaping with Python regex and backreferences, and it
I'm trying to implement a data compression idea I've had, and since I'm imagining
I'm trying to implement something like this: <div> <table> <thead> <tr> <td>Port name</td> <td>Current
We are trying to implement a REST API for an application we have now.
I am trying to implement a software Null Modem . Any suggestion how to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.