yes but why nhibernate want to update the table title, i just want to
update the user table that has a fk of the table title.
Thanks fabio

On 4 Dez., 17:33, Fabio Maulo <[email protected]> wrote:
> The nhusers group is anotherhttps://groups.google.com/group/nhusers
>
> btw, you have to specify the cascade strategy (cascade="none" mean : don't
> save in cascade).
>
> On Sat, Dec 4, 2010 at 9:54 AM, megaman 
> <[email protected]>wrote:
>
>
>
> > hi everyone,
>
> > i implemented the tip of the book "nhibernate 3 cookbook"
> > concerning "CbpT" pattern. In my modell i have an unidirectional many-
> > to-one association in the child. Here is the example:
>
> > Title
> > -----
> > TitleId
> > Description
>
> > User
> > -----
> > UserId
> > TitleId
>
> > The class user has a reference to the object Title because i want to
> > display in my gui the description. So user has a  unidirectional many-
> > to-one association with the table Title.
>
> > if i save the User say Session.save( User ) and ten call SaveAll()
> > which flush the session, i get the exception "save transient entity
> > Title" and dont get that because the cascade option is set to none.
>
> > The definition of this association in the user mapping file is:
> > many-to-one
> > name="Title"
> > column="TitleId"
> > class="Title"
> > cascade="none"
> > not-found="ignore"
>
> > Thanks in advance
>
> --
> Fabio Maulo

Reply via email to