I need to delete childs objects when the parent was deleted, i have
this case:

    public sealed class ClientMap : ClassMap<Entities.Client> {
        public ClientMap() {
            Id(x => x.Id).GeneratedBy.Native();
            Map(x => x.Name).Length(200).Not.Nullable();

            HasMany(x => x.Cons);
        }
    }

    public sealed class ConsMap : ClassMap<Entities.Cons> {
        public ConsMap() {
            Id(x => x.Codigo).GeneratedBy.Native();

            References(x => x.Client);
            References(x => x.Prog);
        }
    }

    public class ProgMap : ClassMap<Entities.Prog> {
        public PorgMap() {
            Id(x => x.Id).GeneratedBy.Native();

            HasMany(x => x.Cons);

        }
    }

When i delete Client or Porg i need to delete all cons. what a need to
do?

-- 
You received this message because you are subscribed to the Google Groups 
"Fluent NHibernate" group.
To post to this group, send email to fluent-nhibern...@googlegroups.com.
To unsubscribe from this group, send email to 
fluent-nhibernate+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/fluent-nhibernate?hl=en.

Reply via email to