I resolved the <unique=true>, I read the XML Schema of nhibernate mapping, and it says unique it is an attribute of element many-to-one, so the final code is
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
assembly="NhfluentTest2.Model"
namespace="Testing2.EntityClasses">
<class name="Table3" table=""public"."table3"" optimistic-lock="version" >
<composite-id>
<key-property name="PkP1" column="pk_p1" />
<key-property name="PkP2" column="pk_p2" />
</composite-id>
<many-to-one name="Table2EntityViaFkT2" access="field.camelcase-underscore" fetch="select" unique="true">
<column name="fk_t2"/>
</many-to-one>
</class>
</hibernate-mapping>
but now I have a similar error about 2 columns but only 1 column mapped.
broken column mapping for: Table3EntityViaId.id of: Testing2.EntityClasses.Table2, type component[PkP1,PkP2] expects 2 columns, but 1 were mapped
For now, I'm only playing with the framework, there is no inconvenience for me, also learning to solve these exceptions, they teach me about the internals of the framework and learning from my mistakes.
Carlos Duran