Mapping Onetomany Nhibernate

Asked

Viewed 73 times

0

Hello,

In an application has a class that I need to do a Onetomany mapping, this parent class will be responsible for performing the persisntecia of the daughter class. My question is, I mapped Bag in the parent class as below:

        Bag(x => x.ItensMovimentacaoBanco, x =>
        {
            x.Cascade(Cascade.Persist);
            x.Key(y =>
            {
                y.Column("MovimentacaoBancoId");
                y.NotNullable(true);
            });
            x.Lazy(CollectionLazy.Lazy);
        }, x => x.OneToMany());

Now I also need to do the Manytoone mapping on the son class?

1 answer

0


Browser other questions tagged

You are not signed in. Login or sign up in order to post.