I currently have a “ComponentAnalysis” table and a “HistoryOfUse” table that I am trying to display in Fluent NHibernate.
Component analysis should have only 1 usage history, and usage history should belong to 1-component analysis. This tells me that the tables should be configured to display from 1 to 1. But the database designer did not configure it that way.
Instead, HistoryOfUse has a column called ComponentAnalysisID to indicate which component analysis it belongs to. To match the database, I had to have links to HistoryOfUse. ComponentAnalysis and ComponentAnalysis must have HasMany HistoryOfUse.
But if I do, I need a list of type HistoryOfUse, which seems pretty annoying. Is there a way to set this without modifying the database to allow ComponentAnalysis to have one HistoryOfUse object, although, according to the database structure, it should have a list of them?
source
share