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

  • Home
  • SEARCH
  • 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 3876228
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T22:21:27+00:00 2026-05-19T22:21:27+00:00

there are three existing tables defined like the following: create table business_units (id number(10,0)

  • 0

there are three existing tables defined like the following:

create table business_units (id number(10,0) not null, ... , primary key (id))
create table categories (id number(10,0) not null, ... , primary key (id))
create table paragraphs (
    id number(10,0) not null,
    business_unit_fk number(10,0),
    category_fk number(10,0),
    ...,
    primary key (id)
)

the entities are defined like:

public class BusinessUnit : Entity {
    public virtual IList<Category> Categories { get; protected set; }
}

public class Category : Entity {
    public virtual IList<Paragraph> Paragraphs { get; protected set; }
}

public class Paragraph : Entity {
    public virtual BusinessUnit Category { get; set; }
    public virtual Category Category { get; set; }
}

i have tried the following overrides:

BusinessUnit auto-mapping override:

mapping.HasMany(x => x.Categories)
    .Table("pp_paragraphs")
    .KeyColumn("business_unit_fk")
    .Inverse();

Category auto-mapping override:

mapping.HasMany(x => x.Categories)
    .Inverse();

i have has-many and many-to-one conventions that take care of the column names, so i don’t think i need to specify here (or at least i don’t think so). The auto-mapper takes care of the many-to-one reference for Paragraph.

the has-many mapping for BusinessUnit does not work. how can i pull this off?

  • 1 1 Answer
  • 3 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-19T22:21:28+00:00Added an answer on May 19, 2026 at 10:21 pm

    You must use HasManyToMany here

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

Sidebar

Related Questions

There is an existing table with three columns which all form the primary key.
I have an existing database with tables which each have 4 partitions (there are
Consider a database(MSSQL 2005) that consists of 100+ tables which have primary keys defined
How do I migrate users from a existing users table to Forms Authentication? There
I am trying to create three tables: Users username userID Categories category categoryID userID
I have a table defined as such: CREATE TABLE `_debug_log` ( ... ) ENGINE=MyISAM
Are there existing template extract libraries in either python or php? Perl has Template::Extract
Is there existing software for discriminative reranking, such as that used by the Charniak
Is there any existing solution to embed the app.config file into the resulting assembly?
Are there any existing add-ons which would provide the functionality Upload image from local

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.