I have a class whose primary key is a column, which is a reference to the single column primary key of another object. The only way to see it in NHibernate is to pretend that it is a composite key (even if it is a column key) and using key-reference mapping. Is there any more appropriate way?
Bottom Snippet:
Category Company Export Carteria Public Company Company {Receive; Set; } Class company public string id {get; Set; } COMPANY_EXPORT_CRITERIA table (COMPANY_ID) as the company table (as ID PK) - Company map for CompanyExportCriteria map. PS - I'm using the NHibernate fluid for mapping.
Here is a link to one-to-one mapping documentation for Fluent NBibernate:
Here's the same thing for NHibernate:
You should not need an overall key.
>
Comments
Post a Comment