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 3633020
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T00:35:59+00:00 2026-05-19T00:35:59+00:00

I have a multi-database application configured with NHibernate. The entities that correspond to tables

  • 0

I have a multi-database application configured with NHibernate. The entities that correspond to tables from each database are in their own separate assemblies (an assembly per database if you will). I have a need/desire to relate an entity from one database to an entity of another database. Everything up to this point works as I want it to (the application handles multiple session factories, etc.).

The relationship I want is many-to-one, but in reality my application only cares about one side of the relationship (for reasons that aren’t relevant). The relevant entities are Project and PMProject, where a Project HAS A PMProject. When I map the many-to-one, I get the following error:

NHibernate.MappingException: An association from the table PROJECTS refers to an unmapped class: SDMS.PPRM.PMProject

The Project mapping itself reads (ignore the funky column naming; it’s an Oracle db):

<many-to-one name="PMProject" class="SDMS.PPRM.PMProject" column="PM_PROJECT_ID" cascade="none" />

In the class attribute, I’m referencing the appropriate assembly, but I get that error which seems to tell me it simply can’t find the mapping file for PMProject. But that file exists (it’s set as embedded resource), the session factory instantiation works without fail; so I’m at a loss on how to tell the Project mapping how/where to look for the appropriate mapping. Is there something I’m missing? A better way to go about this?

Thanks in advance.

  • 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-19T00:35:59+00:00Added an answer on May 19, 2026 at 12:35 am

    I ended up having to bypass my “ideal” scenario and avoid having a direct object relationship between entities of the different databases. For this app, that’s ok, for future apps with the same req, I’d like to find a suitable solution.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In our multi-tier business application we have ObservableCollections of Self-Tracking Entities that are returned
Having in mind that each webapp has its own separate database (but all databases
We have a multi-tenant system with a separate database per tenant (but with the
I'm building a multi-threaded service application in Delphi XE2. Each thread serves its own
I have an application that uses the grails multi-tenant-core plug-in to host multiple versions
I have an application that connects to a database and can be used in
I have a multi tier application in c# that is supposed to perform tasks
We have a typical multi-tier/layer architecture. Application + WCF Service + Repository/EF4/Database. We are
We have a multi module project with following modules: Database Persistence Business Application The
I have a multi-timezone web application that stores all of the datetime values in

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.