I can't figure out how to map a table structure like below within fluent nhibernate. Based on how I have the data laid about below you can see that there is no direct relationship between the Transaction or Member table and the CodeSet table. The id goes directly to the CodeValue table. So inside code you will find hardcoded values for the CodeSet tables. This is old code and I don't know if I should just change it or if nHibernate can deal with it.
I have the following tables:
Generic Lookup tables:
CodeSet
ID
Name
Display
CodeValue
ID
CodeSetId
Name
Display
ReferenceValue
I then have tables like
Transaction
ID
TransactionTypeId
Name
Member
ID
FirstName
LastName
MemberTypeId
The TransactionTypeId and MemberTypeId relates back to the CodeValueId on the CodeValue table.
I suggest you read or walkthrough the 'Your first project' in the Fluent NHibernate 'Getting Started' document.
The retail company example has a very similar structure to what you're trying to implement.
https://github.com/jagregory/fluent-nhibernate/wiki/Getting-started
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.