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

The Archive Base Latest Questions

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

Let say I have a request table, that looks as follows: RequestId INT ReferenceNumber

  • 0

Let say I have a request table, that looks as follows:

RequestId INT  
ReferenceNumber VARCHAR

Each request is logged in a requestlog table. There are no foreign keys between the tables:

RequestLogId INT  
ReferenceNumber VARCHAR  
Content VARCHAR  

The requestlog contains the content of the request, and this content needs to be stored for a period of time. The request can be deleted, but the log can only be deleted after a period of time.

How can I map my request object so that it can contain a list of requestlogs, based on the referencenumber?

I tried this:

Table("InsuranceRequest");  
Id(i => i.Id).Column("InsuranceRequestId");  
Map(i => i.ReferenceNumber);  
HasMany(i => i.InsuranceRequestLog).KeyColumn("RefenceNumber").LazyLoad.Cascade.None();

It doesn’t work though. This mapping tries to map the referencenumber to the RequestLogId of requestlog. Is there a way to specify that the joining column should be the insurancerequestlog referencenumber?

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

    nothing prevent the many to many in your table structure..
    i recommend to change the structure and make them foreign keys, and i’m sure that the many to many mapping will work for u if the mapping i not working after the structure change.

    another tip for u:
    take an empty db and try expose schema..
    than u’ll be able to see what nhibernate think the structure should look like

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

Sidebar

Related Questions

Let's say I have a line of code that looks like this: setInterval(ajaxFunction,3000); where
Let's say I have a service interface that looks like this: public interface IFooService
Let's say I have a java program that makes an HTTP request on a
Let's say we have a table with columns DAY and NUMERO. There can be
I have this GUI that shows, let's say Customer Orders. When my client nailed
Let's say I have a transactional application that consists of four pages: An origination
Let's say I have 50 requests that I started using BeginGetResponse . How do
Let's say I have a view: def pony_view(request, arg1, arg2): ... Make ponies, etc
Let's say I have many web services (REST or normal HTTP request) and I
Let say I have something like this in a JSP: <li> <c:set var=sectionId scope=request

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.