1
How do I map a table that has a composite key in Nhibernate?
For example: I have a table called configuracao
. This table has a reference to the table local_estoque
. Normally a map would look like this:
References(x => x.Local_Estoque_Ordem_Servico, "id_local_ordem_servico");
However, in the table local_estoque
the primary key is composed ("id_filial" e "id_local_estoque)
. What is the mapping for this case?
See the override in the equals class cited in the answer to this question to resolve this from the composite key http://answall.com/questions/111337/mappingfluent-chave-composta-nhibernate-com-banco-firebird
– Ismael