Hi,
this is my mapping, can you tell what is wrong with it?
<class name="Menu" table="s_menu">
<id name="Id">
<column name="id" />
<generator class="native" />
</id>
<property name="Name">
<column name="name" />
</property>
<bag name="Programs" table="s_menu_programs" cascade="none"
lazy="false">
<key column ="Id" />
<many-to-many class="Program" column="program_id" />
</bag>
</class>
<class name="Program" table="s_programs">
<id name="Id">
<column name="id" />
<generator class="native" />
</id>
<property name="Type">
<column name="type" />
</property>
<property name="Description">
<column name="description" />
</property>
<property name="Code">
<column name="code" />
</property>
<property name="Form">
<column name="form" />
</property>
</class>
Op maandag 29 december 2014 00:17:02 UTC+1 schreef fba:
>
> Check you cascading options in the mapping.
>
> Envoyé de mon iPhone
>
> Le 28 déc. 2014 à 23:38, [email protected] <javascript:> a
> écrit :
>
> Hi all,
>
> I'm using NHibernate in combination with VB.Net, and have following code:
>
> Dim rmen As IMenu = New MenuRepository
> Dim rpgm As IProgram = New ProgramRepository
> Dim menus As MCls.Domain.Menu = rmen.GetByName(Menu.SelectedItem)
> Dim prog As Program = rpgm.Get(MenuItems.SelectedValue)
> menus.Programs.Remove(prog)
> rmen.Update(menus)
>
>
> This is not working, the item is still in the "bag"
> What am I doing wrong?
>
> Benjamin
>
> --
> You received this message because you are subscribed to the Google Groups
> "nhusers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected] <javascript:>.
> To post to this group, send email to [email protected] <javascript:>
> .
> Visit this group at http://groups.google.com/group/nhusers.
> For more options, visit https://groups.google.com/d/optout.
>
>
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.