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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T08:38:56+00:00 2026-06-10T08:38:56+00:00

If I want my object to reference a foo object using the foo_key field

  • 0

If I want my object to reference a “foo” object using the “foo_key” field I code it like this:

References(x => x.foo)
.Column(“foo_key”);

My problem with this is that I much prefer the compile-time safety of fluent, and I hate seeing that hard-coded string “foo_key”, when I know that there is a property of that same name. I would like instead to use this:

References(x => x.foo)
.Column(x=> x.foo.foo_key);

Am I missing something in Fluent nHibernate? Should this not be possible, and strongly desired?

  • 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-06-10T08:38:58+00:00Added an answer on June 10, 2026 at 8:38 am

    Column is not a property, it is the name of the column in the database. It must be a string.

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

Sidebar

Related Questions

In my ios application i want to store an object's reference. This object can
I currently have this type of code: private void FillObject(Object MainObject, Foo Arg1, Bar
I have some domain classes that look something like this, that I want to
I want to hyperlink to a page within the Word 2007 Object Model Reference
I want to hold reference to object so it doesn't get deleted in bind
I know that in OOP you want every object (from a class) to be
My requirement is that I want an object (tee) to update if there have
I want a Python object that will monitor whether other objects have changed since
I have a DateTime object I want to compare against an sql datetime field
I want to increment integer members of an object using Interlocked.Increment, but I want

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.