I am using idbag (because I then user sequence) and has the following
relationship: functionality ->> Permission <<- Profile. Here is the
mapping of the Feature table:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" default-
lazy="true" assembly="ObjetoXP">
<class name="ObjetoXP.SeguFuncionalidade,ObjetoXP"
table="tb_segu_funcionalidade" lazy="true">
<!-- Chaves Primarias -->
<id name="Id" column="flde_ch_funcionalidade" type="Decimal">
<generator class="native"/>
</id>
<!-- Chaves estrangeiras n-1-->
<many-to-one name="Modulo" column="modu_ch_modulo"
class="ObjetoXP.SeguModulo,ObjetoXP" not-null="true" />
<!-- Propriedades -->
<property column="flde_tx_descricao" type="String"
name="Descricao" not-null="true" />
<!-- Relações 1-N-->
<set name="ListaObjc" inverse="true" cascade="all"
lazy="true">
<key column="flde_ch_funcionalidade"/>
<one-to-many class="ObjetoXP.SeguObjetoFunc,ObjetoXP" />
</set>
<idbag name="ListaFuncPerm" table="tb_segu_permissao"
lazy="true" cascade="all" inverse="false">
<collection-id column="perm_ch_permissao" type="Decimal">
<generator class="native"></generator>
</collection-id>
<key column="flde_ch_funcionalidade" />
<many-to-many class="ObjetoXP.SeguPerfil,ObjetoXP"
column="perf_ch_perfil" outer-join="true"/>
</idbag>
</class>
</hibernate-mapping>
Precisely the idbag not working properly. I try to insert two elements
from the feature list and only insert a ListaFuncPerm. The interesting
thing is that if I use the bag with mapping works correctly.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---