<?xml version="1.0" encoding="utf-8" ?>

<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
	<class name="AidA.Data.Entities.Antrag, AidA" table="Antrag">
		<id name="Id" column="Id" type="Int64" unsaved-value="null">
			<generator class="identity" />
		</id>
		<property name="AntragsNummer" type="Int64" />
		<property name="Prio" type="Boolean" />
		<property name="EingangsDatum" type="DateTime2" />
		<property name="FaelligkeitsDatum" type="DateTime2" />
		<property name="BewilligungsJahr" type="Int32" />
		<property name="Wiedervorlage" type="Boolean" />
		<property name="Bemerkung" type="String" />
		<property name="Memo" type="String" />
		<property name="Version" type="Int64" />
		<property name="Aktualisiert" type="Boolean" />

		<property name="SachbearbeiterId" type="Int64" />

		<many-to-one name="AntragsStatus" column="AntragsStatusId" class="AidA.Data.Entities.AntragsStatus, AidA" cascade="none" />
		<many-to-one name="Ansprechpartner" column="AnsprechpartnerId" class="AidA.Data.Entities.Ansprechpartner, AidA" cascade="none" />
		<bag name="AntragsPersonenDatenListe" table="AntragsPersonenDaten" generic="true" cascade="all-delete-orphan" batch-size="250">
			<key column="AntragsId" />
			<one-to-many class="AidA.Data.Entities.AntragsPersonenDaten, AidA" />
		</bag>
		<bag name="Kommunikationen" table="Kommunikation" generic="true">
			<key column="AntragsId" />
			<one-to-many class="AidA.Data.Entities.Kommunikation, AidA" />
		</bag>
		<!--bag name="Anonymisierungen" table="Anonymisierung" generic="true" cascade="all-delete-orphan">
			<key column="AntragsId" />
			<one-to-many class="AidA.Data.Entities.Anonymisierung, AidA" />
		</bag-->
	</class>
</hibernate-mapping>