<?xml version="1.0" encoding="ISO-8859-1"?>
<persistence-config extends="DOC_PES_Facture" file="PES_Facture/PES-Facture-persist.xml">
    <layer name="mysql" persistence-model="xemelios-sql">
        <document id="DOC_FactureRecette" extends="DOC_PES_Facture">
            <table type="repository" base-name="FACTURERECETTE_REPOSITORY" extends="PES_FACTURE_REPOSITORY"/>
            <table type="special-key" base-name="FACTURERECETTE_SPECIAL_KEYS" extends="PES_FACTURE_SPECIAL_KEYS"/>
            <table type="list-bc" base-name="FACTURERECETTE_LIST_BUDG_COLL" extends="PES_FACTURE_LIST_BUDG_COLL"/>
            
            <etat id="PESFacture" import-xslt-file="Facture-recette/PES-Facture-import-mysql.xsl">
				<table type="document" base-name="FACTURERECETTE_DOCUMENTS" extends="PES_FACTURE_DOCUMENTS"/>
				<table type="index" base-name="FACTURERECETTE_PESFACTURE_IX" extends="PES_FACTURE_PESFACTURE_IX" main="true"/>
				<table type="index" base-name="FACTURERECETTE_PESFACTURE_TIERS_IX" extends="PES_FACTURE_PESFACTURE_TIERS_IX"/>
				<table type="index" base-name="FACTURERECETTE_PESFACTURE_FACTUREINDIV_IX" extends="PES_FACTURE_PESFACTURE_FACTUREINDIV_IX"/>
				<table type="index" base-name="FACTURERECETTE_FACTUREINDIV_REFERENCE_IX" extends="PES_FACTURE_FACTUREINDIV_REFERENCE_IX"/>
				<table type="index" base-name="FACTURERECETTE_FACTUREINDIV_TIERS_IX" extends="PES_FACTURE_FACTUREINDIV_TIERS_IX"/>
				<table type="index" base-name="FACTURERECETTE_FACTUREINDIV_LIGNEFACTURE_IX" extends="PES_FACTURE_FACTUREINDIV_LIGNEFACTURE_IX"/>
				<table type="index" base-name="FACTURERECETTE_LIGNEFACTURE_TIERS_IX" extends="PES_FACTURE_LIGNEFACTURE_TIERS_IX"/>
				<table type="index" base-name="FACTURERECETTE_LIGNEFACTURE_REFERENCE_IX" extends="PES_FACTURE_LIGNEFACTURE_REFERENCE_IX"/>
				<table type="index" base-name="FACTURERECETTE_FACTUREINDIV_DETAILTVA_IX" extends="PES_FACTURE_FACTUREINDIV_DETAILTVA_IX"/>
				
				<element id="PES_FACTURE_PESFACTURE_TIERS_IX"> 
					<sql-count>COUNT(DISTINCT(CONCAT(FACTURERECETTE_PESFACTURE_IX.DOC_ID,FACTURERECETTE_PESFACTURE_TIERS_IX.NODE_ID)))</sql-count>
					<special-cond>FACTURERECETTE_PESFACTURE_TIERS_IX.NODE_ID IS NOT NULL</special-cond>
				</element>
				<element id="PES_FACTURE_PESFACTURE_FACTUREINDIV_IX"> 
					<sql-count>COUNT(DISTINCT(CONCAT(FACTURERECETTE_PESFACTURE_IX.DOC_ID,FACTURERECETTE_PESFACTURE_FACTUREINDIV_IX.NODE_ID)))</sql-count>
					<special-cond>FACTURERECETTE_PESFACTURE_FACTUREINDIV_IX.NODE_ID IS NOT NULL</special-cond>
				</element>
				<element id="PES_FACTURE_FACTUREINDIV_REFERENCE_IX"> 
					<sql-count>COUNT(DISTINCT(CONCAT(FACTURERECETTE_PESFACTURE_IX.DOC_ID,FACTURERECETTE_FACTUREINDIV_REFERENCE_IX.NODE_ID)))</sql-count>
					<special-cond>FACTURERECETTE_FACTUREINDIV_REFERENCE_IX.NODE_ID IS NOT NULL</special-cond>
				</element>
				<element id="PES_FACTURE_FACTUREINDIV_TIERS_IX"> 
					<sql-count>COUNT(DISTINCT(CONCAT(FACTURERECETTE_PESFACTURE_IX.DOC_ID,FACTURERECETTE_FACTUREINDIV_TIERS_IX.NODE_ID)))</sql-count>
					<special-cond>FACTURERECETTE_FACTUREINDIV_TIERS_IX.NODE_ID IS NOT NULL</special-cond>
				</element>
				<element id="PES_FACTURE_FACTUREINDIV_LIGNEFACTURE_IX"> 
					<sql-count>COUNT(DISTINCT(CONCAT(FACTURERECETTE_PESFACTURE_IX.DOC_ID,FACTURERECETTE_FACTUREINDIV_LIGNEFACTURE_IX.NODE_ID)))</sql-count>
					<special-cond>FACTURERECETTE_FACTUREINDIV_LIGNEFACTURE_IX.NODE_ID IS NOT NULL</special-cond>
				</element>
				<element id="PES_FACTURE_LIGNEFACTURE_TIERS_IX"> 
					<sql-count>COUNT(DISTINCT(CONCAT(FACTURERECETTE_PESFACTURE_IX.DOC_ID,FACTURERECETTE_LIGNEFACTURE_TIERS_IX.NODE_ID)))</sql-count>
					<special-cond>FACTURERECETTE_LIGNEFACTURE_TIERS_IX.NODE_ID IS NOT NULL</special-cond>
				</element>
				<element id="PES_FACTURE_LIGNEFACTURE_REFERENCE_IX"> 
					<sql-count>COUNT(DISTINCT(CONCAT(FACTURERECETTE_PESFACTURE_IX.DOC_ID,FACTURERECETTE_LIGNEFACTURE_REFERENCE_IX.NODE_ID)))</sql-count>
					<special-cond>FACTURERECETTE_LIGNEFACTURE_REFERENCE_IX.NODE_ID IS NOT NULL</special-cond>
				</element>
				<element id="PES_FACTURE_FACTUREINDIV_DETAILTVA_IX"> 
					<sql-count>COUNT(DISTINCT(CONCAT(FACTURERECETTE_PESFACTURE_IX.DOC_ID,FACTURERECETTE_FACTUREINDIV_DETAILTVA_IX.NODE_ID)))</sql-count>
					<special-cond>FACTURERECETTE_FACTUREINDIV_DETAILTVA_IX.NODE_ID IS NOT NULL</special-cond>
				</element>
			</etat>
        </document>
    </layer>
</persistence-config>