Is there any rule defined for this FK on the database level? I mean, maybe its cascade is setted to "set null".
Take a look at this link: https://stackoverflow.com/questions/44556033/cascade-alldeleteorphan-readonly-does-not-work On Thu, Apr 4, 2019 at 4:21 PM Eluander Lopes <eluan...@gmail.com> wrote: > I have the same problem, did you find any solution? > > Em quarta-feira, 19 de maio de 2010 18:34:01 UTC-3, RenzoV escreveu: >> >> I have a feeling this is quite simpel but i can't figure out what i'm >> doing wrong. I got a simpel one to many relationship. Here are the >> mappings: >> >> public class PostMap : ClassMap<Post> >> { >> public PostMap() >> { >> Id(x => x.Id); >> Map(x => x.Title); >> Map(x => x.Content); >> Map(x => x.PostDate); >> HasMany(x => x.Comments).Cascade.AllDeleteOrphan(); >> } >> } >> >> public class CommentMap : ClassMap<Comment> >> { >> public CommentMap() >> { >> Id(x => x.Id); >> Map(x => x.Text); >> References(x => x.Post); >> } >> } >> >> When i delete a Post it sets the Post_id in the Comments table to >> null. I want it to delete the entire record. I've tried all cascade >> options but nothing has the desired effect. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Fluent NHibernate" group. >> To post to this group, send email to fluent-n...@googlegroups.com. >> To unsubscribe from this group, send email to >> fluent-n...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/fluent-nhibernate?hl=en. >> >> -- > You received this message because you are subscribed to the Google Groups > "Fluent NHibernate" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to fluent-nhibernate+unsubscr...@googlegroups.com. > To post to this group, send email to fluent-nhibernate@googlegroups.com. > Visit this group at https://groups.google.com/group/fluent-nhibernate. > For more options, visit https://groups.google.com/d/optout. > -- ______________________________________ Felipe B Oriani felipeori...@gmail.com -- You received this message because you are subscribed to the Google Groups "Fluent NHibernate" group. To unsubscribe from this group and stop receiving emails from it, send an email to fluent-nhibernate+unsubscr...@googlegroups.com. To post to this group, send email to fluent-nhibernate@googlegroups.com. Visit this group at https://groups.google.com/group/fluent-nhibernate. For more options, visit https://groups.google.com/d/optout.