using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Castle.ActiveRecord;

namespace ManyToOneExample
{
    [ActiveRecord]
    public class Jednostka : ActiveRecordBase
    {
        public Jednostka() { L_Osoba = new List<Osoba>(); }

        [PrimaryKey]
        public int ID { get; set; }

        [Property]
        public string Nazwa { get; set; }

        [HasMany( typeof( Osoba ), Table = "Osoba", ColumnKey = "ID_Jednostka", Cascade=ManyRelationCascadeEnum.All )]
        public IList<Osoba> L_Osoba { get; set; }
    }
}
