How do I map this relationship in Fluent NHibernate


+1 vote
asked Mar 1, 2016 by Their (810 points)
I am learning how to use NHibernate and Fluent API with Auto Mapping, and I am trying to figure out how to define particular relationship.

5 Answers

0 votes
answered Apr 16, 2016 by Koogle (840 points)
 
Best answer

Get Mapping Steps(mapper, convention Finder) .
commented Apr 18, 2016 by nazzise (650 points)
This problem still exists
commented Apr 18, 2016 by saner_seems (350 points)
I was experiencing with that same error and this line of code really helps me
–1 vote
answered Mar 9, 2016 by Solverson (870 points)

Let's take a look at a fluent map for this table.
Let's map these two properties into our hbm.
The cascade attribute tells NHibernate how to handle objects when we delete them.
For more on that see https://www.packtpub.com/books/content/nhibernate-2-mapping-relationships-and-fluent-mapping
commented Mar 11, 2016 by cneFound (1,010 points)
Let's start with the OrderHeader side
commented Mar 11, 2016 by week_That (890 points)
When Fluent NHibernate finds ChildMap it knows that it's a subclass of Parent
commented Mar 11, 2016 by amsberry (1,800 points)
This is an old answer that I posted some years ago
+2 votes
answered Mar 31, 2016 by Surroun (800 points)

This type of mapping always requires more than one column.
Fluent NHibernate's interface is designed for discoverability.

You can also take help from following thread Fluent mapping - Fluent NHibernate Wiki - Wikia
commented Mar 31, 2016 by Agular_2682 (750 points)
There are different variations of scenario that can cause this situation
0 votes
answered May 21, 2016 by vqr713 (510 points)
Another possible solution to this error that I found
Check out Fluent NHibernate & HasOne(): how to implement a one-to ... for examples
0 votes
answered May 21, 2016 by rynNida (160 points)
At Fluent Nhibernate Mapping - Best way to map many to you can found a really good and really simple library
I got the information here

What is Geekub?

Q&A site for professional and enthusiast programmers, software developers and other technical users. With your help, we hope to work together to build a library of detailed answers to just about any question that is related to programming!







...