a.binder 8 роки тому
батько
коміт
dbe40ea516
17 змінених файлів з 9308 додано та 1173 видалено
  1. 604 68
      SE/schema/ant-object/default_db.IN7_DZIENNIK_KORESP/ID_KORESP_DO_REALIZ/ID_KORESP_DO_REALIZ.xsd
  2. 604 68
      SE/schema/ant-object/default_db.IN7_DZIENNIK_KORESP/ID_KORESP_DO_UZG/ID_KORESP_DO_UZG.xsd
  3. 604 68
      SE/schema/ant-object/default_db.IN7_DZIENNIK_KORESP/ID_KORESP_DO_UZG_ZUD/ID_KORESP_DO_UZG_ZUD.xsd
  4. 604 68
      SE/schema/ant-object/default_db.IN7_DZIENNIK_KORESP/ID_KORESP_INVEST_ARRANGEMENT_DEAL/ID_KORESP_INVEST_ARRANGEMENT_DEAL.xsd
  5. 604 68
      SE/schema/ant-object/default_db.IN7_DZIENNIK_KORESP/ID_KORESP_INVEST_ARRANGEMENT_DEAL_SIGNED/ID_KORESP_INVEST_ARRANGEMENT_DEAL_SIGNED.xsd
  6. 604 68
      SE/schema/ant-object/default_db.IN7_DZIENNIK_KORESP/ID_KORESP_OFFER/ID_KORESP_OFFER.xsd
  7. 604 68
      SE/schema/ant-object/default_db.IN7_DZIENNIK_KORESP/ID_KORESP_POM_GEOD/ID_KORESP_POM_GEOD.xsd
  8. 604 68
      SE/schema/ant-object/default_db.IN7_DZIENNIK_KORESP/ID_KORESP_PROJEKT/ID_KORESP_PROJEKT.xsd
  9. 604 68
      SE/schema/ant-object/default_db.IN7_DZIENNIK_KORESP/ID_KORESP_PROJEKT_WYK/ID_KORESP_PROJEKT_WYK.xsd
  10. 604 68
      SE/schema/ant-object/default_db.IN7_DZIENNIK_KORESP/ID_KORESP_PROTOK_ODB/ID_KORESP_PROTOK_ODB.xsd
  11. 604 68
      SE/schema/ant-object/default_db.IN7_DZIENNIK_KORESP/ID_KORESP_UZG/ID_KORESP_UZG.xsd
  12. 604 68
      SE/schema/ant-object/default_db.IN7_DZIENNIK_KORESP/ID_KORESP_UZG_ZUD/ID_KORESP_UZG_ZUD.xsd
  13. 604 68
      SE/schema/ant-object/default_db.IN7_DZIENNIK_KORESP/ID_KORESP_ZGL_ODB/ID_KORESP_ZGL_ODB.xsd
  14. 604 68
      SE/schema/ant-object/default_db.IN7_DZIENNIK_KORESP/ID_KORESP_ZLECENIE/ID_KORESP_ZLECENIE.xsd
  15. 842 217
      SE/schema/ant-object/default_db.IN7_DZIENNIK_KORESP/IN7_DZIENNIK_KORESP/IN7_DZIENNIK_KORESP.xsd
  16. 2 1
      SE/schema/ant-object/default_db.MK_Rewiry/MK_Rewiry/MK_Rewiry.xsd
  17. 8 3
      SE/schema/ant-object/default_db.SALES_PLAN/SALES_PLAN/SALES_PLAN.xsd

+ 604 - 68
SE/schema/ant-object/default_db.IN7_DZIENNIK_KORESP/ID_KORESP_DO_REALIZ/ID_KORESP_DO_REALIZ.xsd

@@ -208,7 +208,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
          <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                      maxOccurs="unbounded"
-                     minOccurs="0"/>
+                     minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="P_ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
          <xs:element name="A_RECORD_CREATE_AUTHOR"
                      minOccurs="0"
@@ -228,7 +238,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      minOccurs="0"
                      default=""
                      type="xs:string"/>
-         <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                   system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="L_APPOITMENT_PERIOD"
                      minOccurs="0"
                      default="0"
@@ -274,7 +294,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
          <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
          <xs:element minOccurs="0"
-                     ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                     ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="K_TYP_RODZAJ"
                      minOccurs="0"
                      default="ZWYKLY"
@@ -290,7 +320,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      minOccurs="0"
                      default="0"
                      type="xs:integer"/>
-         <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_BILLING_USERS"
+                                                   system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
          <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
          <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -323,15 +366,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
          <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
          <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-         <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                     minOccurs="0"
-                     default="0"
-                     type="xs:integer"/>
-         <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+         <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
          <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-         <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_ZASOB"
+                                                   system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
          <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-         <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_DEVICE"
+                                                   system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
          <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                      minOccurs="0"
                      default="0"
@@ -339,7 +406,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                      minOccurs="0"/>
          <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-         <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+         <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
          <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
          <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
          <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -361,18 +428,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      minOccurs="1"
                      default="1"
                      type="xs:integer"/>
-         <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+         <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                   system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
          <xs:element maxOccurs="unbounded"
                      ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                     minOccurs="0"/>
+                     minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element maxOccurs="unbounded"
                      minOccurs="0"
-                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element maxOccurs="unbounded"
                      minOccurs="0"
-                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                     minOccurs="0"/>
+                     minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
       </xs:sequence>
    </xs:complexType>
    <xs:element name="IN7_DZIENNIK_KORESP"
@@ -394,7 +524,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
                <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                            maxOccurs="unbounded"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="P_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
                <xs:element name="A_RECORD_CREATE_AUTHOR"
                            minOccurs="0"
@@ -414,7 +554,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default=""
                            type="xs:string"/>
-               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="L_APPOITMENT_PERIOD"
                            minOccurs="0"
                            default="0"
@@ -460,7 +610,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
                <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
                <xs:element minOccurs="0"
-                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="K_TYP_RODZAJ"
                            minOccurs="0"
                            default="ZWYKLY"
@@ -476,7 +636,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default="0"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_USERS"
+                                                         system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -509,15 +682,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
                <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-               <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                           minOccurs="0"
-                           default="0"
-                           type="xs:integer"/>
-               <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+               <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
                <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_ZASOB"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
                <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_DEVICE"
+                                                         system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
                <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"
                            default="0"
@@ -525,7 +722,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"/>
                <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
                <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
                <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
                <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -547,18 +744,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="1"
                            default="1"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
                <xs:element maxOccurs="unbounded"
                            ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
             </xs:sequence>
          </xs:restriction>
       </xs:complexContent>
@@ -570,6 +830,22 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:field xpath="ID"/>
       </xs:unique>
    </xs:element>
+   <xs:element name="ID_KORESP_PROJ_WYK"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"/>
+   <xs:element name="ID_KORESP_PROJ"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"/>
+   <xs:element name="ID_KORESP_ZLECENIE_PROJEKT"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP">
+      <xs:annotation>
+         <xs:documentation>Uzyte w MK_Rewiry</xs:documentation>
+      </xs:annotation>
+   </xs:element>
+   <xs:element name="ID_KORESP_UMOWA_DEVELOPPER"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP">
+      <xs:annotation>
+         <xs:documentation>Uzyte w MK Rewiry</xs:documentation>
+      </xs:annotation>
+   </xs:element>
    <xs:element name="ID_KORESP_PROJEKT_WYK"
                type="default_db__x3A__IN7_DZIENNIK_KORESP:ID_KORESP_PROJEKT"/>
    <xs:complexType name="ID_KORESP_OFFER">
@@ -580,7 +856,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
                <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                            maxOccurs="unbounded"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="P_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
                <xs:element name="A_RECORD_CREATE_AUTHOR"
                            minOccurs="0"
@@ -600,7 +886,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default=""
                            type="xs:string"/>
-               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="L_APPOITMENT_PERIOD"
                            minOccurs="0"
                            default="0"
@@ -646,7 +942,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
                <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
                <xs:element minOccurs="0"
-                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="K_TYP_RODZAJ"
                            minOccurs="0"
                            default="ZWYKLY"
@@ -662,7 +968,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default="0"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_USERS"
+                                                         system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -695,15 +1014,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
                <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-               <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                           minOccurs="0"
-                           default="0"
-                           type="xs:integer"/>
-               <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+               <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
                <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_ZASOB"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
                <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_DEVICE"
+                                                         system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
                <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"
                            default="0"
@@ -711,7 +1054,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"/>
                <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
                <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
                <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
                <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -733,18 +1076,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="1"
                            default="1"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
                <xs:element maxOccurs="unbounded"
                            ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                           minOccurs="1"/>
+                           minOccurs="1">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
             </xs:sequence>
          </xs:restriction>
       </xs:complexContent>
@@ -757,7 +1163,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
                <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                            maxOccurs="unbounded"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="P_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
                <xs:element name="A_RECORD_CREATE_AUTHOR"
                            minOccurs="0"
@@ -777,7 +1193,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default=""
                            type="xs:string"/>
-               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="L_APPOITMENT_PERIOD"
                            minOccurs="0"
                            default="0"
@@ -823,7 +1249,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
                <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
                <xs:element minOccurs="0"
-                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="K_TYP_RODZAJ"
                            minOccurs="0"
                            default="ZWYKLY"
@@ -839,7 +1275,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default="0"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_USERS"
+                                                         system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -872,15 +1321,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
                <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-               <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                           minOccurs="0"
-                           default="0"
-                           type="xs:integer"/>
-               <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+               <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
                <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_ZASOB"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
                <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_DEVICE"
+                                                         system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
                <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"
                            default="0"
@@ -888,7 +1361,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"/>
                <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
                <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
                <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
                <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -910,18 +1383,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="1"
                            default="1"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
                <xs:element maxOccurs="unbounded"
                            ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
             </xs:sequence>
          </xs:restriction>
       </xs:complexContent>

+ 604 - 68
SE/schema/ant-object/default_db.IN7_DZIENNIK_KORESP/ID_KORESP_DO_UZG/ID_KORESP_DO_UZG.xsd

@@ -208,7 +208,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
          <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                      maxOccurs="unbounded"
-                     minOccurs="0"/>
+                     minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="P_ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
          <xs:element name="A_RECORD_CREATE_AUTHOR"
                      minOccurs="0"
@@ -228,7 +238,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      minOccurs="0"
                      default=""
                      type="xs:string"/>
-         <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                   system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="L_APPOITMENT_PERIOD"
                      minOccurs="0"
                      default="0"
@@ -274,7 +294,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
          <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
          <xs:element minOccurs="0"
-                     ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                     ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="K_TYP_RODZAJ"
                      minOccurs="0"
                      default="ZWYKLY"
@@ -290,7 +320,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      minOccurs="0"
                      default="0"
                      type="xs:integer"/>
-         <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_BILLING_USERS"
+                                                   system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
          <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
          <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -323,15 +366,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
          <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
          <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-         <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                     minOccurs="0"
-                     default="0"
-                     type="xs:integer"/>
-         <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+         <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
          <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-         <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_ZASOB"
+                                                   system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
          <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-         <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_DEVICE"
+                                                   system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
          <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                      minOccurs="0"
                      default="0"
@@ -339,7 +406,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                      minOccurs="0"/>
          <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-         <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+         <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
          <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
          <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
          <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -361,18 +428,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      minOccurs="1"
                      default="1"
                      type="xs:integer"/>
-         <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+         <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                   system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
          <xs:element maxOccurs="unbounded"
                      ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                     minOccurs="0"/>
+                     minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element maxOccurs="unbounded"
                      minOccurs="0"
-                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element maxOccurs="unbounded"
                      minOccurs="0"
-                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                     minOccurs="0"/>
+                     minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
       </xs:sequence>
    </xs:complexType>
    <xs:element name="IN7_DZIENNIK_KORESP"
@@ -394,7 +524,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
                <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                            maxOccurs="unbounded"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="P_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
                <xs:element name="A_RECORD_CREATE_AUTHOR"
                            minOccurs="0"
@@ -414,7 +554,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default=""
                            type="xs:string"/>
-               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="L_APPOITMENT_PERIOD"
                            minOccurs="0"
                            default="0"
@@ -460,7 +610,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
                <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
                <xs:element minOccurs="0"
-                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="K_TYP_RODZAJ"
                            minOccurs="0"
                            default="ZWYKLY"
@@ -476,7 +636,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default="0"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_USERS"
+                                                         system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -509,15 +682,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
                <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-               <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                           minOccurs="0"
-                           default="0"
-                           type="xs:integer"/>
-               <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+               <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
                <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_ZASOB"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
                <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_DEVICE"
+                                                         system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
                <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"
                            default="0"
@@ -525,7 +722,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"/>
                <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
                <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
                <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
                <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -547,18 +744,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="1"
                            default="1"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
                <xs:element maxOccurs="unbounded"
                            ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
             </xs:sequence>
          </xs:restriction>
       </xs:complexContent>
@@ -570,6 +830,22 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:field xpath="ID"/>
       </xs:unique>
    </xs:element>
+   <xs:element name="ID_KORESP_PROJ_WYK"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"/>
+   <xs:element name="ID_KORESP_PROJ"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"/>
+   <xs:element name="ID_KORESP_ZLECENIE_PROJEKT"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP">
+      <xs:annotation>
+         <xs:documentation>Uzyte w MK_Rewiry</xs:documentation>
+      </xs:annotation>
+   </xs:element>
+   <xs:element name="ID_KORESP_UMOWA_DEVELOPPER"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP">
+      <xs:annotation>
+         <xs:documentation>Uzyte w MK Rewiry</xs:documentation>
+      </xs:annotation>
+   </xs:element>
    <xs:element name="ID_KORESP_PROJEKT_WYK"
                type="default_db__x3A__IN7_DZIENNIK_KORESP:ID_KORESP_PROJEKT"/>
    <xs:complexType name="ID_KORESP_OFFER">
@@ -580,7 +856,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
                <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                            maxOccurs="unbounded"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="P_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
                <xs:element name="A_RECORD_CREATE_AUTHOR"
                            minOccurs="0"
@@ -600,7 +886,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default=""
                            type="xs:string"/>
-               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="L_APPOITMENT_PERIOD"
                            minOccurs="0"
                            default="0"
@@ -646,7 +942,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
                <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
                <xs:element minOccurs="0"
-                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="K_TYP_RODZAJ"
                            minOccurs="0"
                            default="ZWYKLY"
@@ -662,7 +968,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default="0"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_USERS"
+                                                         system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -695,15 +1014,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
                <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-               <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                           minOccurs="0"
-                           default="0"
-                           type="xs:integer"/>
-               <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+               <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
                <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_ZASOB"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
                <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_DEVICE"
+                                                         system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
                <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"
                            default="0"
@@ -711,7 +1054,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"/>
                <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
                <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
                <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
                <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -733,18 +1076,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="1"
                            default="1"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
                <xs:element maxOccurs="unbounded"
                            ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                           minOccurs="1"/>
+                           minOccurs="1">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
             </xs:sequence>
          </xs:restriction>
       </xs:complexContent>
@@ -757,7 +1163,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
                <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                            maxOccurs="unbounded"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="P_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
                <xs:element name="A_RECORD_CREATE_AUTHOR"
                            minOccurs="0"
@@ -777,7 +1193,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default=""
                            type="xs:string"/>
-               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="L_APPOITMENT_PERIOD"
                            minOccurs="0"
                            default="0"
@@ -823,7 +1249,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
                <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
                <xs:element minOccurs="0"
-                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="K_TYP_RODZAJ"
                            minOccurs="0"
                            default="ZWYKLY"
@@ -839,7 +1275,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default="0"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_USERS"
+                                                         system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -872,15 +1321,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
                <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-               <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                           minOccurs="0"
-                           default="0"
-                           type="xs:integer"/>
-               <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+               <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
                <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_ZASOB"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
                <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_DEVICE"
+                                                         system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
                <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"
                            default="0"
@@ -888,7 +1361,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"/>
                <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
                <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
                <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
                <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -910,18 +1383,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="1"
                            default="1"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
                <xs:element maxOccurs="unbounded"
                            ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
             </xs:sequence>
          </xs:restriction>
       </xs:complexContent>

+ 604 - 68
SE/schema/ant-object/default_db.IN7_DZIENNIK_KORESP/ID_KORESP_DO_UZG_ZUD/ID_KORESP_DO_UZG_ZUD.xsd

@@ -208,7 +208,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
          <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                      maxOccurs="unbounded"
-                     minOccurs="0"/>
+                     minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="P_ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
          <xs:element name="A_RECORD_CREATE_AUTHOR"
                      minOccurs="0"
@@ -228,7 +238,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      minOccurs="0"
                      default=""
                      type="xs:string"/>
-         <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                   system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="L_APPOITMENT_PERIOD"
                      minOccurs="0"
                      default="0"
@@ -274,7 +294,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
          <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
          <xs:element minOccurs="0"
-                     ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                     ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="K_TYP_RODZAJ"
                      minOccurs="0"
                      default="ZWYKLY"
@@ -290,7 +320,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      minOccurs="0"
                      default="0"
                      type="xs:integer"/>
-         <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_BILLING_USERS"
+                                                   system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
          <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
          <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -323,15 +366,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
          <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
          <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-         <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                     minOccurs="0"
-                     default="0"
-                     type="xs:integer"/>
-         <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+         <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
          <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-         <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_ZASOB"
+                                                   system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
          <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-         <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_DEVICE"
+                                                   system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
          <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                      minOccurs="0"
                      default="0"
@@ -339,7 +406,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                      minOccurs="0"/>
          <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-         <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+         <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
          <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
          <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
          <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -361,18 +428,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      minOccurs="1"
                      default="1"
                      type="xs:integer"/>
-         <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+         <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                   system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
          <xs:element maxOccurs="unbounded"
                      ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                     minOccurs="0"/>
+                     minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element maxOccurs="unbounded"
                      minOccurs="0"
-                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element maxOccurs="unbounded"
                      minOccurs="0"
-                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                     minOccurs="0"/>
+                     minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
       </xs:sequence>
    </xs:complexType>
    <xs:element name="IN7_DZIENNIK_KORESP"
@@ -394,7 +524,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
                <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                            maxOccurs="unbounded"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="P_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
                <xs:element name="A_RECORD_CREATE_AUTHOR"
                            minOccurs="0"
@@ -414,7 +554,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default=""
                            type="xs:string"/>
-               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="L_APPOITMENT_PERIOD"
                            minOccurs="0"
                            default="0"
@@ -460,7 +610,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
                <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
                <xs:element minOccurs="0"
-                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="K_TYP_RODZAJ"
                            minOccurs="0"
                            default="ZWYKLY"
@@ -476,7 +636,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default="0"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_USERS"
+                                                         system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -509,15 +682,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
                <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-               <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                           minOccurs="0"
-                           default="0"
-                           type="xs:integer"/>
-               <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+               <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
                <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_ZASOB"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
                <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_DEVICE"
+                                                         system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
                <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"
                            default="0"
@@ -525,7 +722,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"/>
                <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
                <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
                <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
                <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -547,18 +744,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="1"
                            default="1"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
                <xs:element maxOccurs="unbounded"
                            ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
             </xs:sequence>
          </xs:restriction>
       </xs:complexContent>
@@ -570,6 +830,22 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:field xpath="ID"/>
       </xs:unique>
    </xs:element>
+   <xs:element name="ID_KORESP_PROJ_WYK"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"/>
+   <xs:element name="ID_KORESP_PROJ"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"/>
+   <xs:element name="ID_KORESP_ZLECENIE_PROJEKT"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP">
+      <xs:annotation>
+         <xs:documentation>Uzyte w MK_Rewiry</xs:documentation>
+      </xs:annotation>
+   </xs:element>
+   <xs:element name="ID_KORESP_UMOWA_DEVELOPPER"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP">
+      <xs:annotation>
+         <xs:documentation>Uzyte w MK Rewiry</xs:documentation>
+      </xs:annotation>
+   </xs:element>
    <xs:element name="ID_KORESP_PROJEKT_WYK"
                type="default_db__x3A__IN7_DZIENNIK_KORESP:ID_KORESP_PROJEKT"/>
    <xs:complexType name="ID_KORESP_OFFER">
@@ -580,7 +856,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
                <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                            maxOccurs="unbounded"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="P_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
                <xs:element name="A_RECORD_CREATE_AUTHOR"
                            minOccurs="0"
@@ -600,7 +886,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default=""
                            type="xs:string"/>
-               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="L_APPOITMENT_PERIOD"
                            minOccurs="0"
                            default="0"
@@ -646,7 +942,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
                <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
                <xs:element minOccurs="0"
-                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="K_TYP_RODZAJ"
                            minOccurs="0"
                            default="ZWYKLY"
@@ -662,7 +968,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default="0"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_USERS"
+                                                         system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -695,15 +1014,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
                <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-               <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                           minOccurs="0"
-                           default="0"
-                           type="xs:integer"/>
-               <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+               <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
                <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_ZASOB"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
                <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_DEVICE"
+                                                         system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
                <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"
                            default="0"
@@ -711,7 +1054,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"/>
                <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
                <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
                <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
                <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -733,18 +1076,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="1"
                            default="1"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
                <xs:element maxOccurs="unbounded"
                            ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                           minOccurs="1"/>
+                           minOccurs="1">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
             </xs:sequence>
          </xs:restriction>
       </xs:complexContent>
@@ -757,7 +1163,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
                <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                            maxOccurs="unbounded"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="P_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
                <xs:element name="A_RECORD_CREATE_AUTHOR"
                            minOccurs="0"
@@ -777,7 +1193,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default=""
                            type="xs:string"/>
-               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="L_APPOITMENT_PERIOD"
                            minOccurs="0"
                            default="0"
@@ -823,7 +1249,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
                <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
                <xs:element minOccurs="0"
-                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="K_TYP_RODZAJ"
                            minOccurs="0"
                            default="ZWYKLY"
@@ -839,7 +1275,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default="0"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_USERS"
+                                                         system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -872,15 +1321,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
                <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-               <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                           minOccurs="0"
-                           default="0"
-                           type="xs:integer"/>
-               <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+               <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
                <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_ZASOB"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
                <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_DEVICE"
+                                                         system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
                <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"
                            default="0"
@@ -888,7 +1361,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"/>
                <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
                <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
                <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
                <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -910,18 +1383,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="1"
                            default="1"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
                <xs:element maxOccurs="unbounded"
                            ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
             </xs:sequence>
          </xs:restriction>
       </xs:complexContent>

+ 604 - 68
SE/schema/ant-object/default_db.IN7_DZIENNIK_KORESP/ID_KORESP_INVEST_ARRANGEMENT_DEAL/ID_KORESP_INVEST_ARRANGEMENT_DEAL.xsd

@@ -208,7 +208,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
          <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                      maxOccurs="unbounded"
-                     minOccurs="0"/>
+                     minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="P_ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
          <xs:element name="A_RECORD_CREATE_AUTHOR"
                      minOccurs="0"
@@ -228,7 +238,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      minOccurs="0"
                      default=""
                      type="xs:string"/>
-         <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                   system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="L_APPOITMENT_PERIOD"
                      minOccurs="0"
                      default="0"
@@ -274,7 +294,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
          <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
          <xs:element minOccurs="0"
-                     ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                     ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="K_TYP_RODZAJ"
                      minOccurs="0"
                      default="ZWYKLY"
@@ -290,7 +320,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      minOccurs="0"
                      default="0"
                      type="xs:integer"/>
-         <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_BILLING_USERS"
+                                                   system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
          <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
          <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -323,15 +366,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
          <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
          <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-         <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                     minOccurs="0"
-                     default="0"
-                     type="xs:integer"/>
-         <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+         <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
          <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-         <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_ZASOB"
+                                                   system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
          <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-         <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_DEVICE"
+                                                   system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
          <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                      minOccurs="0"
                      default="0"
@@ -339,7 +406,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                      minOccurs="0"/>
          <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-         <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+         <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
          <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
          <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
          <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -361,18 +428,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      minOccurs="1"
                      default="1"
                      type="xs:integer"/>
-         <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+         <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                   system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
          <xs:element maxOccurs="unbounded"
                      ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                     minOccurs="0"/>
+                     minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element maxOccurs="unbounded"
                      minOccurs="0"
-                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element maxOccurs="unbounded"
                      minOccurs="0"
-                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                     minOccurs="0"/>
+                     minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
       </xs:sequence>
    </xs:complexType>
    <xs:element name="IN7_DZIENNIK_KORESP"
@@ -394,7 +524,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
                <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                            maxOccurs="unbounded"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="P_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
                <xs:element name="A_RECORD_CREATE_AUTHOR"
                            minOccurs="0"
@@ -414,7 +554,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default=""
                            type="xs:string"/>
-               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="L_APPOITMENT_PERIOD"
                            minOccurs="0"
                            default="0"
@@ -460,7 +610,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
                <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
                <xs:element minOccurs="0"
-                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="K_TYP_RODZAJ"
                            minOccurs="0"
                            default="ZWYKLY"
@@ -476,7 +636,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default="0"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_USERS"
+                                                         system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -509,15 +682,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
                <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-               <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                           minOccurs="0"
-                           default="0"
-                           type="xs:integer"/>
-               <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+               <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
                <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_ZASOB"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
                <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_DEVICE"
+                                                         system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
                <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"
                            default="0"
@@ -525,7 +722,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"/>
                <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
                <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
                <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
                <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -547,18 +744,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="1"
                            default="1"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
                <xs:element maxOccurs="unbounded"
                            ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
             </xs:sequence>
          </xs:restriction>
       </xs:complexContent>
@@ -570,6 +830,22 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:field xpath="ID"/>
       </xs:unique>
    </xs:element>
+   <xs:element name="ID_KORESP_PROJ_WYK"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"/>
+   <xs:element name="ID_KORESP_PROJ"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"/>
+   <xs:element name="ID_KORESP_ZLECENIE_PROJEKT"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP">
+      <xs:annotation>
+         <xs:documentation>Uzyte w MK_Rewiry</xs:documentation>
+      </xs:annotation>
+   </xs:element>
+   <xs:element name="ID_KORESP_UMOWA_DEVELOPPER"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP">
+      <xs:annotation>
+         <xs:documentation>Uzyte w MK Rewiry</xs:documentation>
+      </xs:annotation>
+   </xs:element>
    <xs:element name="ID_KORESP_PROJEKT_WYK"
                type="default_db__x3A__IN7_DZIENNIK_KORESP:ID_KORESP_PROJEKT"/>
    <xs:complexType name="ID_KORESP_OFFER">
@@ -580,7 +856,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
                <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                            maxOccurs="unbounded"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="P_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
                <xs:element name="A_RECORD_CREATE_AUTHOR"
                            minOccurs="0"
@@ -600,7 +886,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default=""
                            type="xs:string"/>
-               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="L_APPOITMENT_PERIOD"
                            minOccurs="0"
                            default="0"
@@ -646,7 +942,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
                <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
                <xs:element minOccurs="0"
-                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="K_TYP_RODZAJ"
                            minOccurs="0"
                            default="ZWYKLY"
@@ -662,7 +968,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default="0"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_USERS"
+                                                         system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -695,15 +1014,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
                <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-               <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                           minOccurs="0"
-                           default="0"
-                           type="xs:integer"/>
-               <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+               <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
                <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_ZASOB"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
                <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_DEVICE"
+                                                         system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
                <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"
                            default="0"
@@ -711,7 +1054,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"/>
                <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
                <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
                <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
                <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -733,18 +1076,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="1"
                            default="1"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
                <xs:element maxOccurs="unbounded"
                            ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                           minOccurs="1"/>
+                           minOccurs="1">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
             </xs:sequence>
          </xs:restriction>
       </xs:complexContent>
@@ -757,7 +1163,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
                <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                            maxOccurs="unbounded"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="P_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
                <xs:element name="A_RECORD_CREATE_AUTHOR"
                            minOccurs="0"
@@ -777,7 +1193,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default=""
                            type="xs:string"/>
-               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="L_APPOITMENT_PERIOD"
                            minOccurs="0"
                            default="0"
@@ -823,7 +1249,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
                <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
                <xs:element minOccurs="0"
-                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="K_TYP_RODZAJ"
                            minOccurs="0"
                            default="ZWYKLY"
@@ -839,7 +1275,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default="0"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_USERS"
+                                                         system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -872,15 +1321,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
                <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-               <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                           minOccurs="0"
-                           default="0"
-                           type="xs:integer"/>
-               <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+               <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
                <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_ZASOB"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
                <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_DEVICE"
+                                                         system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
                <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"
                            default="0"
@@ -888,7 +1361,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"/>
                <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
                <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
                <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
                <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -910,18 +1383,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="1"
                            default="1"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
                <xs:element maxOccurs="unbounded"
                            ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
             </xs:sequence>
          </xs:restriction>
       </xs:complexContent>

+ 604 - 68
SE/schema/ant-object/default_db.IN7_DZIENNIK_KORESP/ID_KORESP_INVEST_ARRANGEMENT_DEAL_SIGNED/ID_KORESP_INVEST_ARRANGEMENT_DEAL_SIGNED.xsd

@@ -208,7 +208,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
          <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                      maxOccurs="unbounded"
-                     minOccurs="0"/>
+                     minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="P_ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
          <xs:element name="A_RECORD_CREATE_AUTHOR"
                      minOccurs="0"
@@ -228,7 +238,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      minOccurs="0"
                      default=""
                      type="xs:string"/>
-         <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                   system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="L_APPOITMENT_PERIOD"
                      minOccurs="0"
                      default="0"
@@ -274,7 +294,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
          <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
          <xs:element minOccurs="0"
-                     ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                     ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="K_TYP_RODZAJ"
                      minOccurs="0"
                      default="ZWYKLY"
@@ -290,7 +320,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      minOccurs="0"
                      default="0"
                      type="xs:integer"/>
-         <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_BILLING_USERS"
+                                                   system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
          <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
          <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -323,15 +366,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
          <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
          <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-         <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                     minOccurs="0"
-                     default="0"
-                     type="xs:integer"/>
-         <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+         <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
          <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-         <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_ZASOB"
+                                                   system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
          <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-         <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_DEVICE"
+                                                   system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
          <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                      minOccurs="0"
                      default="0"
@@ -339,7 +406,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                      minOccurs="0"/>
          <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-         <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+         <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
          <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
          <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
          <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -361,18 +428,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      minOccurs="1"
                      default="1"
                      type="xs:integer"/>
-         <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+         <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                   system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
          <xs:element maxOccurs="unbounded"
                      ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                     minOccurs="0"/>
+                     minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element maxOccurs="unbounded"
                      minOccurs="0"
-                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element maxOccurs="unbounded"
                      minOccurs="0"
-                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                     minOccurs="0"/>
+                     minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
       </xs:sequence>
    </xs:complexType>
    <xs:element name="IN7_DZIENNIK_KORESP"
@@ -394,7 +524,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
                <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                            maxOccurs="unbounded"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="P_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
                <xs:element name="A_RECORD_CREATE_AUTHOR"
                            minOccurs="0"
@@ -414,7 +554,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default=""
                            type="xs:string"/>
-               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="L_APPOITMENT_PERIOD"
                            minOccurs="0"
                            default="0"
@@ -460,7 +610,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
                <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
                <xs:element minOccurs="0"
-                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="K_TYP_RODZAJ"
                            minOccurs="0"
                            default="ZWYKLY"
@@ -476,7 +636,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default="0"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_USERS"
+                                                         system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -509,15 +682,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
                <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-               <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                           minOccurs="0"
-                           default="0"
-                           type="xs:integer"/>
-               <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+               <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
                <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_ZASOB"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
                <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_DEVICE"
+                                                         system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
                <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"
                            default="0"
@@ -525,7 +722,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"/>
                <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
                <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
                <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
                <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -547,18 +744,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="1"
                            default="1"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
                <xs:element maxOccurs="unbounded"
                            ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
             </xs:sequence>
          </xs:restriction>
       </xs:complexContent>
@@ -570,6 +830,22 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:field xpath="ID"/>
       </xs:unique>
    </xs:element>
+   <xs:element name="ID_KORESP_PROJ_WYK"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"/>
+   <xs:element name="ID_KORESP_PROJ"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"/>
+   <xs:element name="ID_KORESP_ZLECENIE_PROJEKT"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP">
+      <xs:annotation>
+         <xs:documentation>Uzyte w MK_Rewiry</xs:documentation>
+      </xs:annotation>
+   </xs:element>
+   <xs:element name="ID_KORESP_UMOWA_DEVELOPPER"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP">
+      <xs:annotation>
+         <xs:documentation>Uzyte w MK Rewiry</xs:documentation>
+      </xs:annotation>
+   </xs:element>
    <xs:element name="ID_KORESP_PROJEKT_WYK"
                type="default_db__x3A__IN7_DZIENNIK_KORESP:ID_KORESP_PROJEKT"/>
    <xs:complexType name="ID_KORESP_OFFER">
@@ -580,7 +856,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
                <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                            maxOccurs="unbounded"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="P_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
                <xs:element name="A_RECORD_CREATE_AUTHOR"
                            minOccurs="0"
@@ -600,7 +886,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default=""
                            type="xs:string"/>
-               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="L_APPOITMENT_PERIOD"
                            minOccurs="0"
                            default="0"
@@ -646,7 +942,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
                <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
                <xs:element minOccurs="0"
-                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="K_TYP_RODZAJ"
                            minOccurs="0"
                            default="ZWYKLY"
@@ -662,7 +968,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default="0"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_USERS"
+                                                         system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -695,15 +1014,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
                <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-               <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                           minOccurs="0"
-                           default="0"
-                           type="xs:integer"/>
-               <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+               <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
                <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_ZASOB"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
                <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_DEVICE"
+                                                         system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
                <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"
                            default="0"
@@ -711,7 +1054,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"/>
                <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
                <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
                <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
                <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -733,18 +1076,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="1"
                            default="1"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
                <xs:element maxOccurs="unbounded"
                            ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                           minOccurs="1"/>
+                           minOccurs="1">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
             </xs:sequence>
          </xs:restriction>
       </xs:complexContent>
@@ -757,7 +1163,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
                <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                            maxOccurs="unbounded"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="P_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
                <xs:element name="A_RECORD_CREATE_AUTHOR"
                            minOccurs="0"
@@ -777,7 +1193,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default=""
                            type="xs:string"/>
-               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="L_APPOITMENT_PERIOD"
                            minOccurs="0"
                            default="0"
@@ -823,7 +1249,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
                <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
                <xs:element minOccurs="0"
-                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="K_TYP_RODZAJ"
                            minOccurs="0"
                            default="ZWYKLY"
@@ -839,7 +1275,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default="0"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_USERS"
+                                                         system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -872,15 +1321,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
                <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-               <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                           minOccurs="0"
-                           default="0"
-                           type="xs:integer"/>
-               <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+               <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
                <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_ZASOB"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
                <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_DEVICE"
+                                                         system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
                <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"
                            default="0"
@@ -888,7 +1361,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"/>
                <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
                <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
                <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
                <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -910,18 +1383,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="1"
                            default="1"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
                <xs:element maxOccurs="unbounded"
                            ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
             </xs:sequence>
          </xs:restriction>
       </xs:complexContent>

+ 604 - 68
SE/schema/ant-object/default_db.IN7_DZIENNIK_KORESP/ID_KORESP_OFFER/ID_KORESP_OFFER.xsd

@@ -208,7 +208,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
          <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                      maxOccurs="unbounded"
-                     minOccurs="0"/>
+                     minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="P_ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
          <xs:element name="A_RECORD_CREATE_AUTHOR"
                      minOccurs="0"
@@ -228,7 +238,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      minOccurs="0"
                      default=""
                      type="xs:string"/>
-         <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                   system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="L_APPOITMENT_PERIOD"
                      minOccurs="0"
                      default="0"
@@ -274,7 +294,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
          <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
          <xs:element minOccurs="0"
-                     ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                     ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="K_TYP_RODZAJ"
                      minOccurs="0"
                      default="ZWYKLY"
@@ -290,7 +320,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      minOccurs="0"
                      default="0"
                      type="xs:integer"/>
-         <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_BILLING_USERS"
+                                                   system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
          <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
          <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -323,15 +366,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
          <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
          <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-         <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                     minOccurs="0"
-                     default="0"
-                     type="xs:integer"/>
-         <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+         <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
          <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-         <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_ZASOB"
+                                                   system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
          <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-         <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_DEVICE"
+                                                   system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
          <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                      minOccurs="0"
                      default="0"
@@ -339,7 +406,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                      minOccurs="0"/>
          <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-         <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+         <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
          <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
          <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
          <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -361,18 +428,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      minOccurs="1"
                      default="1"
                      type="xs:integer"/>
-         <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+         <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                   system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
          <xs:element maxOccurs="unbounded"
                      ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                     minOccurs="0"/>
+                     minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element maxOccurs="unbounded"
                      minOccurs="0"
-                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element maxOccurs="unbounded"
                      minOccurs="0"
-                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                     minOccurs="0"/>
+                     minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
       </xs:sequence>
    </xs:complexType>
    <xs:element name="IN7_DZIENNIK_KORESP"
@@ -394,7 +524,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
                <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                            maxOccurs="unbounded"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="P_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
                <xs:element name="A_RECORD_CREATE_AUTHOR"
                            minOccurs="0"
@@ -414,7 +554,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default=""
                            type="xs:string"/>
-               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="L_APPOITMENT_PERIOD"
                            minOccurs="0"
                            default="0"
@@ -460,7 +610,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
                <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
                <xs:element minOccurs="0"
-                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="K_TYP_RODZAJ"
                            minOccurs="0"
                            default="ZWYKLY"
@@ -476,7 +636,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default="0"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_USERS"
+                                                         system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -509,15 +682,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
                <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-               <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                           minOccurs="0"
-                           default="0"
-                           type="xs:integer"/>
-               <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+               <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
                <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_ZASOB"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
                <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_DEVICE"
+                                                         system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
                <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"
                            default="0"
@@ -525,7 +722,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"/>
                <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
                <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
                <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
                <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -547,18 +744,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="1"
                            default="1"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
                <xs:element maxOccurs="unbounded"
                            ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
             </xs:sequence>
          </xs:restriction>
       </xs:complexContent>
@@ -570,6 +830,22 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:field xpath="ID"/>
       </xs:unique>
    </xs:element>
+   <xs:element name="ID_KORESP_PROJ_WYK"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"/>
+   <xs:element name="ID_KORESP_PROJ"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"/>
+   <xs:element name="ID_KORESP_ZLECENIE_PROJEKT"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP">
+      <xs:annotation>
+         <xs:documentation>Uzyte w MK_Rewiry</xs:documentation>
+      </xs:annotation>
+   </xs:element>
+   <xs:element name="ID_KORESP_UMOWA_DEVELOPPER"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP">
+      <xs:annotation>
+         <xs:documentation>Uzyte w MK Rewiry</xs:documentation>
+      </xs:annotation>
+   </xs:element>
    <xs:element name="ID_KORESP_PROJEKT_WYK"
                type="default_db__x3A__IN7_DZIENNIK_KORESP:ID_KORESP_PROJEKT"/>
    <xs:complexType name="ID_KORESP_OFFER">
@@ -580,7 +856,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
                <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                            maxOccurs="unbounded"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="P_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
                <xs:element name="A_RECORD_CREATE_AUTHOR"
                            minOccurs="0"
@@ -600,7 +886,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default=""
                            type="xs:string"/>
-               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="L_APPOITMENT_PERIOD"
                            minOccurs="0"
                            default="0"
@@ -646,7 +942,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
                <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
                <xs:element minOccurs="0"
-                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="K_TYP_RODZAJ"
                            minOccurs="0"
                            default="ZWYKLY"
@@ -662,7 +968,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default="0"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_USERS"
+                                                         system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -695,15 +1014,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
                <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-               <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                           minOccurs="0"
-                           default="0"
-                           type="xs:integer"/>
-               <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+               <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
                <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_ZASOB"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
                <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_DEVICE"
+                                                         system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
                <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"
                            default="0"
@@ -711,7 +1054,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"/>
                <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
                <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
                <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
                <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -733,18 +1076,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="1"
                            default="1"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
                <xs:element maxOccurs="unbounded"
                            ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                           minOccurs="1"/>
+                           minOccurs="1">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
             </xs:sequence>
          </xs:restriction>
       </xs:complexContent>
@@ -757,7 +1163,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
                <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                            maxOccurs="unbounded"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="P_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
                <xs:element name="A_RECORD_CREATE_AUTHOR"
                            minOccurs="0"
@@ -777,7 +1193,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default=""
                            type="xs:string"/>
-               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="L_APPOITMENT_PERIOD"
                            minOccurs="0"
                            default="0"
@@ -823,7 +1249,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
                <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
                <xs:element minOccurs="0"
-                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="K_TYP_RODZAJ"
                            minOccurs="0"
                            default="ZWYKLY"
@@ -839,7 +1275,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default="0"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_USERS"
+                                                         system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -872,15 +1321,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
                <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-               <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                           minOccurs="0"
-                           default="0"
-                           type="xs:integer"/>
-               <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+               <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
                <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_ZASOB"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
                <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_DEVICE"
+                                                         system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
                <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"
                            default="0"
@@ -888,7 +1361,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"/>
                <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
                <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
                <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
                <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -910,18 +1383,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="1"
                            default="1"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
                <xs:element maxOccurs="unbounded"
                            ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
             </xs:sequence>
          </xs:restriction>
       </xs:complexContent>

+ 604 - 68
SE/schema/ant-object/default_db.IN7_DZIENNIK_KORESP/ID_KORESP_POM_GEOD/ID_KORESP_POM_GEOD.xsd

@@ -208,7 +208,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
          <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                      maxOccurs="unbounded"
-                     minOccurs="0"/>
+                     minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="P_ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
          <xs:element name="A_RECORD_CREATE_AUTHOR"
                      minOccurs="0"
@@ -228,7 +238,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      minOccurs="0"
                      default=""
                      type="xs:string"/>
-         <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                   system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="L_APPOITMENT_PERIOD"
                      minOccurs="0"
                      default="0"
@@ -274,7 +294,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
          <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
          <xs:element minOccurs="0"
-                     ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                     ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="K_TYP_RODZAJ"
                      minOccurs="0"
                      default="ZWYKLY"
@@ -290,7 +320,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      minOccurs="0"
                      default="0"
                      type="xs:integer"/>
-         <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_BILLING_USERS"
+                                                   system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
          <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
          <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -323,15 +366,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
          <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
          <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-         <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                     minOccurs="0"
-                     default="0"
-                     type="xs:integer"/>
-         <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+         <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
          <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-         <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_ZASOB"
+                                                   system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
          <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-         <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_DEVICE"
+                                                   system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
          <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                      minOccurs="0"
                      default="0"
@@ -339,7 +406,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                      minOccurs="0"/>
          <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-         <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+         <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
          <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
          <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
          <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -361,18 +428,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      minOccurs="1"
                      default="1"
                      type="xs:integer"/>
-         <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+         <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                   system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
          <xs:element maxOccurs="unbounded"
                      ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                     minOccurs="0"/>
+                     minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element maxOccurs="unbounded"
                      minOccurs="0"
-                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element maxOccurs="unbounded"
                      minOccurs="0"
-                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                     minOccurs="0"/>
+                     minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
       </xs:sequence>
    </xs:complexType>
    <xs:element name="IN7_DZIENNIK_KORESP"
@@ -394,7 +524,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
                <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                            maxOccurs="unbounded"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="P_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
                <xs:element name="A_RECORD_CREATE_AUTHOR"
                            minOccurs="0"
@@ -414,7 +554,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default=""
                            type="xs:string"/>
-               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="L_APPOITMENT_PERIOD"
                            minOccurs="0"
                            default="0"
@@ -460,7 +610,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
                <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
                <xs:element minOccurs="0"
-                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="K_TYP_RODZAJ"
                            minOccurs="0"
                            default="ZWYKLY"
@@ -476,7 +636,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default="0"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_USERS"
+                                                         system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -509,15 +682,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
                <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-               <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                           minOccurs="0"
-                           default="0"
-                           type="xs:integer"/>
-               <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+               <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
                <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_ZASOB"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
                <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_DEVICE"
+                                                         system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
                <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"
                            default="0"
@@ -525,7 +722,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"/>
                <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
                <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
                <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
                <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -547,18 +744,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="1"
                            default="1"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
                <xs:element maxOccurs="unbounded"
                            ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
             </xs:sequence>
          </xs:restriction>
       </xs:complexContent>
@@ -570,6 +830,22 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:field xpath="ID"/>
       </xs:unique>
    </xs:element>
+   <xs:element name="ID_KORESP_PROJ_WYK"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"/>
+   <xs:element name="ID_KORESP_PROJ"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"/>
+   <xs:element name="ID_KORESP_ZLECENIE_PROJEKT"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP">
+      <xs:annotation>
+         <xs:documentation>Uzyte w MK_Rewiry</xs:documentation>
+      </xs:annotation>
+   </xs:element>
+   <xs:element name="ID_KORESP_UMOWA_DEVELOPPER"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP">
+      <xs:annotation>
+         <xs:documentation>Uzyte w MK Rewiry</xs:documentation>
+      </xs:annotation>
+   </xs:element>
    <xs:element name="ID_KORESP_PROJEKT_WYK"
                type="default_db__x3A__IN7_DZIENNIK_KORESP:ID_KORESP_PROJEKT"/>
    <xs:complexType name="ID_KORESP_OFFER">
@@ -580,7 +856,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
                <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                            maxOccurs="unbounded"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="P_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
                <xs:element name="A_RECORD_CREATE_AUTHOR"
                            minOccurs="0"
@@ -600,7 +886,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default=""
                            type="xs:string"/>
-               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="L_APPOITMENT_PERIOD"
                            minOccurs="0"
                            default="0"
@@ -646,7 +942,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
                <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
                <xs:element minOccurs="0"
-                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="K_TYP_RODZAJ"
                            minOccurs="0"
                            default="ZWYKLY"
@@ -662,7 +968,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default="0"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_USERS"
+                                                         system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -695,15 +1014,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
                <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-               <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                           minOccurs="0"
-                           default="0"
-                           type="xs:integer"/>
-               <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+               <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
                <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_ZASOB"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
                <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_DEVICE"
+                                                         system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
                <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"
                            default="0"
@@ -711,7 +1054,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"/>
                <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
                <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
                <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
                <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -733,18 +1076,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="1"
                            default="1"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
                <xs:element maxOccurs="unbounded"
                            ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                           minOccurs="1"/>
+                           minOccurs="1">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
             </xs:sequence>
          </xs:restriction>
       </xs:complexContent>
@@ -757,7 +1163,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
                <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                            maxOccurs="unbounded"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="P_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
                <xs:element name="A_RECORD_CREATE_AUTHOR"
                            minOccurs="0"
@@ -777,7 +1193,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default=""
                            type="xs:string"/>
-               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="L_APPOITMENT_PERIOD"
                            minOccurs="0"
                            default="0"
@@ -823,7 +1249,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
                <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
                <xs:element minOccurs="0"
-                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="K_TYP_RODZAJ"
                            minOccurs="0"
                            default="ZWYKLY"
@@ -839,7 +1275,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default="0"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_USERS"
+                                                         system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -872,15 +1321,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
                <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-               <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                           minOccurs="0"
-                           default="0"
-                           type="xs:integer"/>
-               <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+               <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
                <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_ZASOB"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
                <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_DEVICE"
+                                                         system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
                <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"
                            default="0"
@@ -888,7 +1361,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"/>
                <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
                <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
                <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
                <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -910,18 +1383,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="1"
                            default="1"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
                <xs:element maxOccurs="unbounded"
                            ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
             </xs:sequence>
          </xs:restriction>
       </xs:complexContent>

+ 604 - 68
SE/schema/ant-object/default_db.IN7_DZIENNIK_KORESP/ID_KORESP_PROJEKT/ID_KORESP_PROJEKT.xsd

@@ -208,7 +208,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
          <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                      maxOccurs="unbounded"
-                     minOccurs="0"/>
+                     minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="P_ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
          <xs:element name="A_RECORD_CREATE_AUTHOR"
                      minOccurs="0"
@@ -228,7 +238,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      minOccurs="0"
                      default=""
                      type="xs:string"/>
-         <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                   system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="L_APPOITMENT_PERIOD"
                      minOccurs="0"
                      default="0"
@@ -274,7 +294,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
          <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
          <xs:element minOccurs="0"
-                     ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                     ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="K_TYP_RODZAJ"
                      minOccurs="0"
                      default="ZWYKLY"
@@ -290,7 +320,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      minOccurs="0"
                      default="0"
                      type="xs:integer"/>
-         <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_BILLING_USERS"
+                                                   system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
          <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
          <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -323,15 +366,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
          <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
          <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-         <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                     minOccurs="0"
-                     default="0"
-                     type="xs:integer"/>
-         <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+         <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
          <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-         <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_ZASOB"
+                                                   system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
          <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-         <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_DEVICE"
+                                                   system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
          <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                      minOccurs="0"
                      default="0"
@@ -339,7 +406,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                      minOccurs="0"/>
          <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-         <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+         <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
          <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
          <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
          <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -361,18 +428,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      minOccurs="1"
                      default="1"
                      type="xs:integer"/>
-         <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+         <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                   system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
          <xs:element maxOccurs="unbounded"
                      ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                     minOccurs="0"/>
+                     minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element maxOccurs="unbounded"
                      minOccurs="0"
-                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element maxOccurs="unbounded"
                      minOccurs="0"
-                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                     minOccurs="0"/>
+                     minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
       </xs:sequence>
    </xs:complexType>
    <xs:element name="IN7_DZIENNIK_KORESP"
@@ -394,7 +524,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
                <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                            maxOccurs="unbounded"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="P_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
                <xs:element name="A_RECORD_CREATE_AUTHOR"
                            minOccurs="0"
@@ -414,7 +554,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default=""
                            type="xs:string"/>
-               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="L_APPOITMENT_PERIOD"
                            minOccurs="0"
                            default="0"
@@ -460,7 +610,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
                <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
                <xs:element minOccurs="0"
-                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="K_TYP_RODZAJ"
                            minOccurs="0"
                            default="ZWYKLY"
@@ -476,7 +636,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default="0"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_USERS"
+                                                         system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -509,15 +682,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
                <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-               <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                           minOccurs="0"
-                           default="0"
-                           type="xs:integer"/>
-               <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+               <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
                <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_ZASOB"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
                <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_DEVICE"
+                                                         system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
                <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"
                            default="0"
@@ -525,7 +722,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"/>
                <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
                <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
                <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
                <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -547,18 +744,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="1"
                            default="1"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
                <xs:element maxOccurs="unbounded"
                            ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
             </xs:sequence>
          </xs:restriction>
       </xs:complexContent>
@@ -570,6 +830,22 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:field xpath="ID"/>
       </xs:unique>
    </xs:element>
+   <xs:element name="ID_KORESP_PROJ_WYK"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"/>
+   <xs:element name="ID_KORESP_PROJ"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"/>
+   <xs:element name="ID_KORESP_ZLECENIE_PROJEKT"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP">
+      <xs:annotation>
+         <xs:documentation>Uzyte w MK_Rewiry</xs:documentation>
+      </xs:annotation>
+   </xs:element>
+   <xs:element name="ID_KORESP_UMOWA_DEVELOPPER"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP">
+      <xs:annotation>
+         <xs:documentation>Uzyte w MK Rewiry</xs:documentation>
+      </xs:annotation>
+   </xs:element>
    <xs:element name="ID_KORESP_PROJEKT_WYK"
                type="default_db__x3A__IN7_DZIENNIK_KORESP:ID_KORESP_PROJEKT"/>
    <xs:complexType name="ID_KORESP_OFFER">
@@ -580,7 +856,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
                <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                            maxOccurs="unbounded"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="P_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
                <xs:element name="A_RECORD_CREATE_AUTHOR"
                            minOccurs="0"
@@ -600,7 +886,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default=""
                            type="xs:string"/>
-               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="L_APPOITMENT_PERIOD"
                            minOccurs="0"
                            default="0"
@@ -646,7 +942,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
                <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
                <xs:element minOccurs="0"
-                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="K_TYP_RODZAJ"
                            minOccurs="0"
                            default="ZWYKLY"
@@ -662,7 +968,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default="0"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_USERS"
+                                                         system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -695,15 +1014,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
                <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-               <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                           minOccurs="0"
-                           default="0"
-                           type="xs:integer"/>
-               <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+               <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
                <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_ZASOB"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
                <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_DEVICE"
+                                                         system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
                <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"
                            default="0"
@@ -711,7 +1054,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"/>
                <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
                <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
                <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
                <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -733,18 +1076,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="1"
                            default="1"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
                <xs:element maxOccurs="unbounded"
                            ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                           minOccurs="1"/>
+                           minOccurs="1">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
             </xs:sequence>
          </xs:restriction>
       </xs:complexContent>
@@ -757,7 +1163,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
                <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                            maxOccurs="unbounded"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="P_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
                <xs:element name="A_RECORD_CREATE_AUTHOR"
                            minOccurs="0"
@@ -777,7 +1193,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default=""
                            type="xs:string"/>
-               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="L_APPOITMENT_PERIOD"
                            minOccurs="0"
                            default="0"
@@ -823,7 +1249,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
                <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
                <xs:element minOccurs="0"
-                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="K_TYP_RODZAJ"
                            minOccurs="0"
                            default="ZWYKLY"
@@ -839,7 +1275,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default="0"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_USERS"
+                                                         system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -872,15 +1321,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
                <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-               <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                           minOccurs="0"
-                           default="0"
-                           type="xs:integer"/>
-               <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+               <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
                <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_ZASOB"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
                <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_DEVICE"
+                                                         system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
                <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"
                            default="0"
@@ -888,7 +1361,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"/>
                <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
                <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
                <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
                <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -910,18 +1383,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="1"
                            default="1"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
                <xs:element maxOccurs="unbounded"
                            ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
             </xs:sequence>
          </xs:restriction>
       </xs:complexContent>

+ 604 - 68
SE/schema/ant-object/default_db.IN7_DZIENNIK_KORESP/ID_KORESP_PROJEKT_WYK/ID_KORESP_PROJEKT_WYK.xsd

@@ -208,7 +208,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
          <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                      maxOccurs="unbounded"
-                     minOccurs="0"/>
+                     minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="P_ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
          <xs:element name="A_RECORD_CREATE_AUTHOR"
                      minOccurs="0"
@@ -228,7 +238,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      minOccurs="0"
                      default=""
                      type="xs:string"/>
-         <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                   system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="L_APPOITMENT_PERIOD"
                      minOccurs="0"
                      default="0"
@@ -274,7 +294,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
          <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
          <xs:element minOccurs="0"
-                     ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                     ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="K_TYP_RODZAJ"
                      minOccurs="0"
                      default="ZWYKLY"
@@ -290,7 +320,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      minOccurs="0"
                      default="0"
                      type="xs:integer"/>
-         <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_BILLING_USERS"
+                                                   system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
          <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
          <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -323,15 +366,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
          <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
          <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-         <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                     minOccurs="0"
-                     default="0"
-                     type="xs:integer"/>
-         <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+         <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
          <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-         <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_ZASOB"
+                                                   system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
          <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-         <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_DEVICE"
+                                                   system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
          <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                      minOccurs="0"
                      default="0"
@@ -339,7 +406,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                      minOccurs="0"/>
          <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-         <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+         <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
          <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
          <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
          <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -361,18 +428,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      minOccurs="1"
                      default="1"
                      type="xs:integer"/>
-         <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+         <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                   system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
          <xs:element maxOccurs="unbounded"
                      ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                     minOccurs="0"/>
+                     minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element maxOccurs="unbounded"
                      minOccurs="0"
-                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element maxOccurs="unbounded"
                      minOccurs="0"
-                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                     minOccurs="0"/>
+                     minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
       </xs:sequence>
    </xs:complexType>
    <xs:element name="IN7_DZIENNIK_KORESP"
@@ -394,7 +524,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
                <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                            maxOccurs="unbounded"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="P_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
                <xs:element name="A_RECORD_CREATE_AUTHOR"
                            minOccurs="0"
@@ -414,7 +554,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default=""
                            type="xs:string"/>
-               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="L_APPOITMENT_PERIOD"
                            minOccurs="0"
                            default="0"
@@ -460,7 +610,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
                <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
                <xs:element minOccurs="0"
-                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="K_TYP_RODZAJ"
                            minOccurs="0"
                            default="ZWYKLY"
@@ -476,7 +636,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default="0"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_USERS"
+                                                         system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -509,15 +682,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
                <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-               <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                           minOccurs="0"
-                           default="0"
-                           type="xs:integer"/>
-               <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+               <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
                <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_ZASOB"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
                <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_DEVICE"
+                                                         system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
                <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"
                            default="0"
@@ -525,7 +722,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"/>
                <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
                <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
                <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
                <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -547,18 +744,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="1"
                            default="1"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
                <xs:element maxOccurs="unbounded"
                            ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
             </xs:sequence>
          </xs:restriction>
       </xs:complexContent>
@@ -570,6 +830,22 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:field xpath="ID"/>
       </xs:unique>
    </xs:element>
+   <xs:element name="ID_KORESP_PROJ_WYK"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"/>
+   <xs:element name="ID_KORESP_PROJ"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"/>
+   <xs:element name="ID_KORESP_ZLECENIE_PROJEKT"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP">
+      <xs:annotation>
+         <xs:documentation>Uzyte w MK_Rewiry</xs:documentation>
+      </xs:annotation>
+   </xs:element>
+   <xs:element name="ID_KORESP_UMOWA_DEVELOPPER"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP">
+      <xs:annotation>
+         <xs:documentation>Uzyte w MK Rewiry</xs:documentation>
+      </xs:annotation>
+   </xs:element>
    <xs:element name="ID_KORESP_PROJEKT_WYK"
                type="default_db__x3A__IN7_DZIENNIK_KORESP:ID_KORESP_PROJEKT"/>
    <xs:complexType name="ID_KORESP_OFFER">
@@ -580,7 +856,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
                <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                            maxOccurs="unbounded"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="P_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
                <xs:element name="A_RECORD_CREATE_AUTHOR"
                            minOccurs="0"
@@ -600,7 +886,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default=""
                            type="xs:string"/>
-               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="L_APPOITMENT_PERIOD"
                            minOccurs="0"
                            default="0"
@@ -646,7 +942,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
                <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
                <xs:element minOccurs="0"
-                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="K_TYP_RODZAJ"
                            minOccurs="0"
                            default="ZWYKLY"
@@ -662,7 +968,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default="0"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_USERS"
+                                                         system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -695,15 +1014,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
                <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-               <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                           minOccurs="0"
-                           default="0"
-                           type="xs:integer"/>
-               <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+               <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
                <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_ZASOB"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
                <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_DEVICE"
+                                                         system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
                <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"
                            default="0"
@@ -711,7 +1054,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"/>
                <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
                <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
                <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
                <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -733,18 +1076,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="1"
                            default="1"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
                <xs:element maxOccurs="unbounded"
                            ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                           minOccurs="1"/>
+                           minOccurs="1">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
             </xs:sequence>
          </xs:restriction>
       </xs:complexContent>
@@ -757,7 +1163,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
                <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                            maxOccurs="unbounded"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="P_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
                <xs:element name="A_RECORD_CREATE_AUTHOR"
                            minOccurs="0"
@@ -777,7 +1193,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default=""
                            type="xs:string"/>
-               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="L_APPOITMENT_PERIOD"
                            minOccurs="0"
                            default="0"
@@ -823,7 +1249,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
                <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
                <xs:element minOccurs="0"
-                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="K_TYP_RODZAJ"
                            minOccurs="0"
                            default="ZWYKLY"
@@ -839,7 +1275,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default="0"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_USERS"
+                                                         system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -872,15 +1321,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
                <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-               <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                           minOccurs="0"
-                           default="0"
-                           type="xs:integer"/>
-               <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+               <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
                <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_ZASOB"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
                <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_DEVICE"
+                                                         system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
                <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"
                            default="0"
@@ -888,7 +1361,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"/>
                <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
                <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
                <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
                <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -910,18 +1383,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="1"
                            default="1"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
                <xs:element maxOccurs="unbounded"
                            ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
             </xs:sequence>
          </xs:restriction>
       </xs:complexContent>

+ 604 - 68
SE/schema/ant-object/default_db.IN7_DZIENNIK_KORESP/ID_KORESP_PROTOK_ODB/ID_KORESP_PROTOK_ODB.xsd

@@ -208,7 +208,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
          <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                      maxOccurs="unbounded"
-                     minOccurs="0"/>
+                     minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="P_ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
          <xs:element name="A_RECORD_CREATE_AUTHOR"
                      minOccurs="0"
@@ -228,7 +238,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      minOccurs="0"
                      default=""
                      type="xs:string"/>
-         <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                   system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="L_APPOITMENT_PERIOD"
                      minOccurs="0"
                      default="0"
@@ -274,7 +294,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
          <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
          <xs:element minOccurs="0"
-                     ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                     ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="K_TYP_RODZAJ"
                      minOccurs="0"
                      default="ZWYKLY"
@@ -290,7 +320,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      minOccurs="0"
                      default="0"
                      type="xs:integer"/>
-         <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_BILLING_USERS"
+                                                   system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
          <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
          <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -323,15 +366,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
          <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
          <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-         <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                     minOccurs="0"
-                     default="0"
-                     type="xs:integer"/>
-         <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+         <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
          <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-         <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_ZASOB"
+                                                   system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
          <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-         <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_DEVICE"
+                                                   system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
          <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                      minOccurs="0"
                      default="0"
@@ -339,7 +406,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                      minOccurs="0"/>
          <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-         <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+         <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
          <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
          <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
          <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -361,18 +428,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      minOccurs="1"
                      default="1"
                      type="xs:integer"/>
-         <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+         <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                   system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
          <xs:element maxOccurs="unbounded"
                      ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                     minOccurs="0"/>
+                     minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element maxOccurs="unbounded"
                      minOccurs="0"
-                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element maxOccurs="unbounded"
                      minOccurs="0"
-                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                     minOccurs="0"/>
+                     minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
       </xs:sequence>
    </xs:complexType>
    <xs:element name="IN7_DZIENNIK_KORESP"
@@ -394,7 +524,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
                <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                            maxOccurs="unbounded"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="P_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
                <xs:element name="A_RECORD_CREATE_AUTHOR"
                            minOccurs="0"
@@ -414,7 +554,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default=""
                            type="xs:string"/>
-               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="L_APPOITMENT_PERIOD"
                            minOccurs="0"
                            default="0"
@@ -460,7 +610,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
                <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
                <xs:element minOccurs="0"
-                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="K_TYP_RODZAJ"
                            minOccurs="0"
                            default="ZWYKLY"
@@ -476,7 +636,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default="0"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_USERS"
+                                                         system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -509,15 +682,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
                <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-               <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                           minOccurs="0"
-                           default="0"
-                           type="xs:integer"/>
-               <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+               <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
                <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_ZASOB"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
                <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_DEVICE"
+                                                         system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
                <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"
                            default="0"
@@ -525,7 +722,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"/>
                <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
                <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
                <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
                <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -547,18 +744,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="1"
                            default="1"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
                <xs:element maxOccurs="unbounded"
                            ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
             </xs:sequence>
          </xs:restriction>
       </xs:complexContent>
@@ -570,6 +830,22 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:field xpath="ID"/>
       </xs:unique>
    </xs:element>
+   <xs:element name="ID_KORESP_PROJ_WYK"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"/>
+   <xs:element name="ID_KORESP_PROJ"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"/>
+   <xs:element name="ID_KORESP_ZLECENIE_PROJEKT"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP">
+      <xs:annotation>
+         <xs:documentation>Uzyte w MK_Rewiry</xs:documentation>
+      </xs:annotation>
+   </xs:element>
+   <xs:element name="ID_KORESP_UMOWA_DEVELOPPER"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP">
+      <xs:annotation>
+         <xs:documentation>Uzyte w MK Rewiry</xs:documentation>
+      </xs:annotation>
+   </xs:element>
    <xs:element name="ID_KORESP_PROJEKT_WYK"
                type="default_db__x3A__IN7_DZIENNIK_KORESP:ID_KORESP_PROJEKT"/>
    <xs:complexType name="ID_KORESP_OFFER">
@@ -580,7 +856,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
                <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                            maxOccurs="unbounded"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="P_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
                <xs:element name="A_RECORD_CREATE_AUTHOR"
                            minOccurs="0"
@@ -600,7 +886,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default=""
                            type="xs:string"/>
-               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="L_APPOITMENT_PERIOD"
                            minOccurs="0"
                            default="0"
@@ -646,7 +942,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
                <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
                <xs:element minOccurs="0"
-                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="K_TYP_RODZAJ"
                            minOccurs="0"
                            default="ZWYKLY"
@@ -662,7 +968,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default="0"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_USERS"
+                                                         system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -695,15 +1014,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
                <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-               <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                           minOccurs="0"
-                           default="0"
-                           type="xs:integer"/>
-               <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+               <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
                <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_ZASOB"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
                <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_DEVICE"
+                                                         system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
                <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"
                            default="0"
@@ -711,7 +1054,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"/>
                <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
                <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
                <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
                <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -733,18 +1076,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="1"
                            default="1"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
                <xs:element maxOccurs="unbounded"
                            ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                           minOccurs="1"/>
+                           minOccurs="1">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
             </xs:sequence>
          </xs:restriction>
       </xs:complexContent>
@@ -757,7 +1163,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
                <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                            maxOccurs="unbounded"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="P_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
                <xs:element name="A_RECORD_CREATE_AUTHOR"
                            minOccurs="0"
@@ -777,7 +1193,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default=""
                            type="xs:string"/>
-               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="L_APPOITMENT_PERIOD"
                            minOccurs="0"
                            default="0"
@@ -823,7 +1249,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
                <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
                <xs:element minOccurs="0"
-                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="K_TYP_RODZAJ"
                            minOccurs="0"
                            default="ZWYKLY"
@@ -839,7 +1275,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default="0"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_USERS"
+                                                         system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -872,15 +1321,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
                <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-               <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                           minOccurs="0"
-                           default="0"
-                           type="xs:integer"/>
-               <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+               <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
                <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_ZASOB"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
                <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_DEVICE"
+                                                         system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
                <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"
                            default="0"
@@ -888,7 +1361,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"/>
                <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
                <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
                <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
                <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -910,18 +1383,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="1"
                            default="1"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
                <xs:element maxOccurs="unbounded"
                            ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
             </xs:sequence>
          </xs:restriction>
       </xs:complexContent>

+ 604 - 68
SE/schema/ant-object/default_db.IN7_DZIENNIK_KORESP/ID_KORESP_UZG/ID_KORESP_UZG.xsd

@@ -208,7 +208,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
          <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                      maxOccurs="unbounded"
-                     minOccurs="0"/>
+                     minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="P_ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
          <xs:element name="A_RECORD_CREATE_AUTHOR"
                      minOccurs="0"
@@ -228,7 +238,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      minOccurs="0"
                      default=""
                      type="xs:string"/>
-         <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                   system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="L_APPOITMENT_PERIOD"
                      minOccurs="0"
                      default="0"
@@ -274,7 +294,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
          <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
          <xs:element minOccurs="0"
-                     ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                     ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="K_TYP_RODZAJ"
                      minOccurs="0"
                      default="ZWYKLY"
@@ -290,7 +320,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      minOccurs="0"
                      default="0"
                      type="xs:integer"/>
-         <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_BILLING_USERS"
+                                                   system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
          <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
          <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -323,15 +366,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
          <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
          <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-         <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                     minOccurs="0"
-                     default="0"
-                     type="xs:integer"/>
-         <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+         <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
          <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-         <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_ZASOB"
+                                                   system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
          <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-         <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_DEVICE"
+                                                   system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
          <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                      minOccurs="0"
                      default="0"
@@ -339,7 +406,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                      minOccurs="0"/>
          <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-         <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+         <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
          <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
          <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
          <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -361,18 +428,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      minOccurs="1"
                      default="1"
                      type="xs:integer"/>
-         <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+         <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                   system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
          <xs:element maxOccurs="unbounded"
                      ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                     minOccurs="0"/>
+                     minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element maxOccurs="unbounded"
                      minOccurs="0"
-                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element maxOccurs="unbounded"
                      minOccurs="0"
-                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                     minOccurs="0"/>
+                     minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
       </xs:sequence>
    </xs:complexType>
    <xs:element name="IN7_DZIENNIK_KORESP"
@@ -394,7 +524,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
                <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                            maxOccurs="unbounded"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="P_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
                <xs:element name="A_RECORD_CREATE_AUTHOR"
                            minOccurs="0"
@@ -414,7 +554,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default=""
                            type="xs:string"/>
-               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="L_APPOITMENT_PERIOD"
                            minOccurs="0"
                            default="0"
@@ -460,7 +610,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
                <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
                <xs:element minOccurs="0"
-                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="K_TYP_RODZAJ"
                            minOccurs="0"
                            default="ZWYKLY"
@@ -476,7 +636,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default="0"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_USERS"
+                                                         system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -509,15 +682,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
                <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-               <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                           minOccurs="0"
-                           default="0"
-                           type="xs:integer"/>
-               <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+               <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
                <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_ZASOB"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
                <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_DEVICE"
+                                                         system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
                <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"
                            default="0"
@@ -525,7 +722,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"/>
                <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
                <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
                <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
                <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -547,18 +744,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="1"
                            default="1"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
                <xs:element maxOccurs="unbounded"
                            ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
             </xs:sequence>
          </xs:restriction>
       </xs:complexContent>
@@ -570,6 +830,22 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:field xpath="ID"/>
       </xs:unique>
    </xs:element>
+   <xs:element name="ID_KORESP_PROJ_WYK"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"/>
+   <xs:element name="ID_KORESP_PROJ"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"/>
+   <xs:element name="ID_KORESP_ZLECENIE_PROJEKT"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP">
+      <xs:annotation>
+         <xs:documentation>Uzyte w MK_Rewiry</xs:documentation>
+      </xs:annotation>
+   </xs:element>
+   <xs:element name="ID_KORESP_UMOWA_DEVELOPPER"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP">
+      <xs:annotation>
+         <xs:documentation>Uzyte w MK Rewiry</xs:documentation>
+      </xs:annotation>
+   </xs:element>
    <xs:element name="ID_KORESP_PROJEKT_WYK"
                type="default_db__x3A__IN7_DZIENNIK_KORESP:ID_KORESP_PROJEKT"/>
    <xs:complexType name="ID_KORESP_OFFER">
@@ -580,7 +856,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
                <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                            maxOccurs="unbounded"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="P_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
                <xs:element name="A_RECORD_CREATE_AUTHOR"
                            minOccurs="0"
@@ -600,7 +886,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default=""
                            type="xs:string"/>
-               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="L_APPOITMENT_PERIOD"
                            minOccurs="0"
                            default="0"
@@ -646,7 +942,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
                <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
                <xs:element minOccurs="0"
-                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="K_TYP_RODZAJ"
                            minOccurs="0"
                            default="ZWYKLY"
@@ -662,7 +968,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default="0"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_USERS"
+                                                         system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -695,15 +1014,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
                <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-               <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                           minOccurs="0"
-                           default="0"
-                           type="xs:integer"/>
-               <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+               <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
                <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_ZASOB"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
                <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_DEVICE"
+                                                         system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
                <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"
                            default="0"
@@ -711,7 +1054,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"/>
                <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
                <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
                <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
                <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -733,18 +1076,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="1"
                            default="1"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
                <xs:element maxOccurs="unbounded"
                            ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                           minOccurs="1"/>
+                           minOccurs="1">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
             </xs:sequence>
          </xs:restriction>
       </xs:complexContent>
@@ -757,7 +1163,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
                <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                            maxOccurs="unbounded"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="P_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
                <xs:element name="A_RECORD_CREATE_AUTHOR"
                            minOccurs="0"
@@ -777,7 +1193,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default=""
                            type="xs:string"/>
-               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="L_APPOITMENT_PERIOD"
                            minOccurs="0"
                            default="0"
@@ -823,7 +1249,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
                <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
                <xs:element minOccurs="0"
-                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="K_TYP_RODZAJ"
                            minOccurs="0"
                            default="ZWYKLY"
@@ -839,7 +1275,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default="0"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_USERS"
+                                                         system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -872,15 +1321,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
                <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-               <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                           minOccurs="0"
-                           default="0"
-                           type="xs:integer"/>
-               <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+               <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
                <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_ZASOB"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
                <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_DEVICE"
+                                                         system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
                <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"
                            default="0"
@@ -888,7 +1361,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"/>
                <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
                <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
                <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
                <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -910,18 +1383,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="1"
                            default="1"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
                <xs:element maxOccurs="unbounded"
                            ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
             </xs:sequence>
          </xs:restriction>
       </xs:complexContent>

+ 604 - 68
SE/schema/ant-object/default_db.IN7_DZIENNIK_KORESP/ID_KORESP_UZG_ZUD/ID_KORESP_UZG_ZUD.xsd

@@ -208,7 +208,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
          <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                      maxOccurs="unbounded"
-                     minOccurs="0"/>
+                     minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="P_ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
          <xs:element name="A_RECORD_CREATE_AUTHOR"
                      minOccurs="0"
@@ -228,7 +238,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      minOccurs="0"
                      default=""
                      type="xs:string"/>
-         <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                   system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="L_APPOITMENT_PERIOD"
                      minOccurs="0"
                      default="0"
@@ -274,7 +294,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
          <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
          <xs:element minOccurs="0"
-                     ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                     ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="K_TYP_RODZAJ"
                      minOccurs="0"
                      default="ZWYKLY"
@@ -290,7 +320,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      minOccurs="0"
                      default="0"
                      type="xs:integer"/>
-         <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_BILLING_USERS"
+                                                   system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
          <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
          <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -323,15 +366,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
          <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
          <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-         <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                     minOccurs="0"
-                     default="0"
-                     type="xs:integer"/>
-         <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+         <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
          <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-         <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_ZASOB"
+                                                   system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
          <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-         <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_DEVICE"
+                                                   system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
          <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                      minOccurs="0"
                      default="0"
@@ -339,7 +406,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                      minOccurs="0"/>
          <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-         <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+         <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
          <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
          <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
          <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -361,18 +428,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      minOccurs="1"
                      default="1"
                      type="xs:integer"/>
-         <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+         <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                   system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
          <xs:element maxOccurs="unbounded"
                      ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                     minOccurs="0"/>
+                     minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element maxOccurs="unbounded"
                      minOccurs="0"
-                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element maxOccurs="unbounded"
                      minOccurs="0"
-                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                     minOccurs="0"/>
+                     minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
       </xs:sequence>
    </xs:complexType>
    <xs:element name="IN7_DZIENNIK_KORESP"
@@ -394,7 +524,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
                <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                            maxOccurs="unbounded"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="P_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
                <xs:element name="A_RECORD_CREATE_AUTHOR"
                            minOccurs="0"
@@ -414,7 +554,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default=""
                            type="xs:string"/>
-               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="L_APPOITMENT_PERIOD"
                            minOccurs="0"
                            default="0"
@@ -460,7 +610,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
                <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
                <xs:element minOccurs="0"
-                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="K_TYP_RODZAJ"
                            minOccurs="0"
                            default="ZWYKLY"
@@ -476,7 +636,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default="0"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_USERS"
+                                                         system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -509,15 +682,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
                <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-               <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                           minOccurs="0"
-                           default="0"
-                           type="xs:integer"/>
-               <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+               <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
                <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_ZASOB"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
                <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_DEVICE"
+                                                         system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
                <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"
                            default="0"
@@ -525,7 +722,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"/>
                <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
                <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
                <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
                <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -547,18 +744,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="1"
                            default="1"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
                <xs:element maxOccurs="unbounded"
                            ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
             </xs:sequence>
          </xs:restriction>
       </xs:complexContent>
@@ -570,6 +830,22 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:field xpath="ID"/>
       </xs:unique>
    </xs:element>
+   <xs:element name="ID_KORESP_PROJ_WYK"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"/>
+   <xs:element name="ID_KORESP_PROJ"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"/>
+   <xs:element name="ID_KORESP_ZLECENIE_PROJEKT"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP">
+      <xs:annotation>
+         <xs:documentation>Uzyte w MK_Rewiry</xs:documentation>
+      </xs:annotation>
+   </xs:element>
+   <xs:element name="ID_KORESP_UMOWA_DEVELOPPER"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP">
+      <xs:annotation>
+         <xs:documentation>Uzyte w MK Rewiry</xs:documentation>
+      </xs:annotation>
+   </xs:element>
    <xs:element name="ID_KORESP_PROJEKT_WYK"
                type="default_db__x3A__IN7_DZIENNIK_KORESP:ID_KORESP_PROJEKT"/>
    <xs:complexType name="ID_KORESP_OFFER">
@@ -580,7 +856,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
                <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                            maxOccurs="unbounded"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="P_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
                <xs:element name="A_RECORD_CREATE_AUTHOR"
                            minOccurs="0"
@@ -600,7 +886,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default=""
                            type="xs:string"/>
-               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="L_APPOITMENT_PERIOD"
                            minOccurs="0"
                            default="0"
@@ -646,7 +942,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
                <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
                <xs:element minOccurs="0"
-                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="K_TYP_RODZAJ"
                            minOccurs="0"
                            default="ZWYKLY"
@@ -662,7 +968,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default="0"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_USERS"
+                                                         system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -695,15 +1014,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
                <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-               <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                           minOccurs="0"
-                           default="0"
-                           type="xs:integer"/>
-               <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+               <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
                <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_ZASOB"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
                <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_DEVICE"
+                                                         system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
                <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"
                            default="0"
@@ -711,7 +1054,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"/>
                <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
                <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
                <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
                <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -733,18 +1076,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="1"
                            default="1"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
                <xs:element maxOccurs="unbounded"
                            ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                           minOccurs="1"/>
+                           minOccurs="1">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
             </xs:sequence>
          </xs:restriction>
       </xs:complexContent>
@@ -757,7 +1163,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
                <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                            maxOccurs="unbounded"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="P_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
                <xs:element name="A_RECORD_CREATE_AUTHOR"
                            minOccurs="0"
@@ -777,7 +1193,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default=""
                            type="xs:string"/>
-               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="L_APPOITMENT_PERIOD"
                            minOccurs="0"
                            default="0"
@@ -823,7 +1249,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
                <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
                <xs:element minOccurs="0"
-                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="K_TYP_RODZAJ"
                            minOccurs="0"
                            default="ZWYKLY"
@@ -839,7 +1275,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default="0"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_USERS"
+                                                         system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -872,15 +1321,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
                <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-               <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                           minOccurs="0"
-                           default="0"
-                           type="xs:integer"/>
-               <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+               <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
                <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_ZASOB"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
                <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_DEVICE"
+                                                         system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
                <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"
                            default="0"
@@ -888,7 +1361,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"/>
                <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
                <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
                <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
                <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -910,18 +1383,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="1"
                            default="1"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
                <xs:element maxOccurs="unbounded"
                            ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
             </xs:sequence>
          </xs:restriction>
       </xs:complexContent>

+ 604 - 68
SE/schema/ant-object/default_db.IN7_DZIENNIK_KORESP/ID_KORESP_ZGL_ODB/ID_KORESP_ZGL_ODB.xsd

@@ -208,7 +208,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
          <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                      maxOccurs="unbounded"
-                     minOccurs="0"/>
+                     minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="P_ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
          <xs:element name="A_RECORD_CREATE_AUTHOR"
                      minOccurs="0"
@@ -228,7 +238,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      minOccurs="0"
                      default=""
                      type="xs:string"/>
-         <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                   system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="L_APPOITMENT_PERIOD"
                      minOccurs="0"
                      default="0"
@@ -274,7 +294,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
          <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
          <xs:element minOccurs="0"
-                     ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                     ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="K_TYP_RODZAJ"
                      minOccurs="0"
                      default="ZWYKLY"
@@ -290,7 +320,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      minOccurs="0"
                      default="0"
                      type="xs:integer"/>
-         <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_BILLING_USERS"
+                                                   system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
          <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
          <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -323,15 +366,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
          <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
          <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-         <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                     minOccurs="0"
-                     default="0"
-                     type="xs:integer"/>
-         <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+         <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
          <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-         <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_ZASOB"
+                                                   system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
          <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-         <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_DEVICE"
+                                                   system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
          <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                      minOccurs="0"
                      default="0"
@@ -339,7 +406,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                      minOccurs="0"/>
          <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-         <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+         <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
          <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
          <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
          <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -361,18 +428,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      minOccurs="1"
                      default="1"
                      type="xs:integer"/>
-         <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+         <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                   system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
          <xs:element maxOccurs="unbounded"
                      ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                     minOccurs="0"/>
+                     minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element maxOccurs="unbounded"
                      minOccurs="0"
-                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element maxOccurs="unbounded"
                      minOccurs="0"
-                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                     minOccurs="0"/>
+                     minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
       </xs:sequence>
    </xs:complexType>
    <xs:element name="IN7_DZIENNIK_KORESP"
@@ -394,7 +524,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
                <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                            maxOccurs="unbounded"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="P_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
                <xs:element name="A_RECORD_CREATE_AUTHOR"
                            minOccurs="0"
@@ -414,7 +554,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default=""
                            type="xs:string"/>
-               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="L_APPOITMENT_PERIOD"
                            minOccurs="0"
                            default="0"
@@ -460,7 +610,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
                <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
                <xs:element minOccurs="0"
-                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="K_TYP_RODZAJ"
                            minOccurs="0"
                            default="ZWYKLY"
@@ -476,7 +636,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default="0"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_USERS"
+                                                         system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -509,15 +682,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
                <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-               <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                           minOccurs="0"
-                           default="0"
-                           type="xs:integer"/>
-               <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+               <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
                <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_ZASOB"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
                <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_DEVICE"
+                                                         system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
                <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"
                            default="0"
@@ -525,7 +722,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"/>
                <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
                <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
                <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
                <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -547,18 +744,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="1"
                            default="1"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
                <xs:element maxOccurs="unbounded"
                            ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
             </xs:sequence>
          </xs:restriction>
       </xs:complexContent>
@@ -570,6 +830,22 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:field xpath="ID"/>
       </xs:unique>
    </xs:element>
+   <xs:element name="ID_KORESP_PROJ_WYK"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"/>
+   <xs:element name="ID_KORESP_PROJ"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"/>
+   <xs:element name="ID_KORESP_ZLECENIE_PROJEKT"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP">
+      <xs:annotation>
+         <xs:documentation>Uzyte w MK_Rewiry</xs:documentation>
+      </xs:annotation>
+   </xs:element>
+   <xs:element name="ID_KORESP_UMOWA_DEVELOPPER"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP">
+      <xs:annotation>
+         <xs:documentation>Uzyte w MK Rewiry</xs:documentation>
+      </xs:annotation>
+   </xs:element>
    <xs:element name="ID_KORESP_PROJEKT_WYK"
                type="default_db__x3A__IN7_DZIENNIK_KORESP:ID_KORESP_PROJEKT"/>
    <xs:complexType name="ID_KORESP_OFFER">
@@ -580,7 +856,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
                <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                            maxOccurs="unbounded"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="P_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
                <xs:element name="A_RECORD_CREATE_AUTHOR"
                            minOccurs="0"
@@ -600,7 +886,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default=""
                            type="xs:string"/>
-               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="L_APPOITMENT_PERIOD"
                            minOccurs="0"
                            default="0"
@@ -646,7 +942,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
                <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
                <xs:element minOccurs="0"
-                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="K_TYP_RODZAJ"
                            minOccurs="0"
                            default="ZWYKLY"
@@ -662,7 +968,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default="0"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_USERS"
+                                                         system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -695,15 +1014,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
                <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-               <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                           minOccurs="0"
-                           default="0"
-                           type="xs:integer"/>
-               <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+               <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
                <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_ZASOB"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
                <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_DEVICE"
+                                                         system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
                <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"
                            default="0"
@@ -711,7 +1054,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"/>
                <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
                <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
                <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
                <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -733,18 +1076,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="1"
                            default="1"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
                <xs:element maxOccurs="unbounded"
                            ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                           minOccurs="1"/>
+                           minOccurs="1">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
             </xs:sequence>
          </xs:restriction>
       </xs:complexContent>
@@ -757,7 +1163,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
                <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                            maxOccurs="unbounded"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="P_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
                <xs:element name="A_RECORD_CREATE_AUTHOR"
                            minOccurs="0"
@@ -777,7 +1193,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default=""
                            type="xs:string"/>
-               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="L_APPOITMENT_PERIOD"
                            minOccurs="0"
                            default="0"
@@ -823,7 +1249,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
                <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
                <xs:element minOccurs="0"
-                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="K_TYP_RODZAJ"
                            minOccurs="0"
                            default="ZWYKLY"
@@ -839,7 +1275,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default="0"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_USERS"
+                                                         system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -872,15 +1321,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
                <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-               <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                           minOccurs="0"
-                           default="0"
-                           type="xs:integer"/>
-               <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+               <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
                <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_ZASOB"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
                <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_DEVICE"
+                                                         system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
                <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"
                            default="0"
@@ -888,7 +1361,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"/>
                <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
                <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
                <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
                <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -910,18 +1383,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="1"
                            default="1"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
                <xs:element maxOccurs="unbounded"
                            ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
             </xs:sequence>
          </xs:restriction>
       </xs:complexContent>

+ 604 - 68
SE/schema/ant-object/default_db.IN7_DZIENNIK_KORESP/ID_KORESP_ZLECENIE/ID_KORESP_ZLECENIE.xsd

@@ -208,7 +208,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
          <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                      maxOccurs="unbounded"
-                     minOccurs="0"/>
+                     minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="P_ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
          <xs:element name="A_RECORD_CREATE_AUTHOR"
                      minOccurs="0"
@@ -228,7 +238,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      minOccurs="0"
                      default=""
                      type="xs:string"/>
-         <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                   system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="L_APPOITMENT_PERIOD"
                      minOccurs="0"
                      default="0"
@@ -274,7 +294,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
          <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
          <xs:element minOccurs="0"
-                     ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                     ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="K_TYP_RODZAJ"
                      minOccurs="0"
                      default="ZWYKLY"
@@ -290,7 +320,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      minOccurs="0"
                      default="0"
                      type="xs:integer"/>
-         <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_BILLING_USERS"
+                                                   system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
          <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
          <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -323,15 +366,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
          <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
          <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-         <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                     minOccurs="0"
-                     default="0"
-                     type="xs:integer"/>
-         <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+         <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
          <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-         <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_ZASOB"
+                                                   system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
          <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-         <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+         <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_DEVICE"
+                                                   system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
          <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                      minOccurs="0"
                      default="0"
@@ -339,7 +406,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                      minOccurs="0"/>
          <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-         <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+         <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
          <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
          <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
          <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -361,18 +428,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                      minOccurs="1"
                      default="1"
                      type="xs:integer"/>
-         <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+         <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                   system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+         <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
          <xs:element maxOccurs="unbounded"
                      ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                     minOccurs="0"/>
+                     minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element maxOccurs="unbounded"
                      minOccurs="0"
-                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element maxOccurs="unbounded"
                      minOccurs="0"
-                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                     ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+               <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+            </xs:annotation>
+         </xs:element>
          <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                     minOccurs="0"/>
+                     minOccurs="0">
+            <xs:annotation>
+               <xs:appinfo>
+                  <system_cache__appinfo:flat_relation_cache>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                   system_cache__appinfo:name="ID"
+                                                   system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                  </system_cache__appinfo:flat_relation_cache>
+               </xs:appinfo>
+            </xs:annotation>
+         </xs:element>
       </xs:sequence>
    </xs:complexType>
    <xs:element name="IN7_DZIENNIK_KORESP"
@@ -394,7 +524,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
                <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                            maxOccurs="unbounded"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="P_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
                <xs:element name="A_RECORD_CREATE_AUTHOR"
                            minOccurs="0"
@@ -414,7 +554,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default=""
                            type="xs:string"/>
-               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="L_APPOITMENT_PERIOD"
                            minOccurs="0"
                            default="0"
@@ -460,7 +610,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
                <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
                <xs:element minOccurs="0"
-                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="K_TYP_RODZAJ"
                            minOccurs="0"
                            default="ZWYKLY"
@@ -476,7 +636,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default="0"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_USERS"
+                                                         system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -509,15 +682,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
                <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-               <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                           minOccurs="0"
-                           default="0"
-                           type="xs:integer"/>
-               <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+               <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
                <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_ZASOB"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
                <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_DEVICE"
+                                                         system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
                <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"
                            default="0"
@@ -525,7 +722,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"/>
                <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
                <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
                <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
                <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -547,18 +744,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="1"
                            default="1"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
                <xs:element maxOccurs="unbounded"
                            ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
             </xs:sequence>
          </xs:restriction>
       </xs:complexContent>
@@ -570,6 +830,22 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
          <xs:field xpath="ID"/>
       </xs:unique>
    </xs:element>
+   <xs:element name="ID_KORESP_PROJ_WYK"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"/>
+   <xs:element name="ID_KORESP_PROJ"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"/>
+   <xs:element name="ID_KORESP_ZLECENIE_PROJEKT"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP">
+      <xs:annotation>
+         <xs:documentation>Uzyte w MK_Rewiry</xs:documentation>
+      </xs:annotation>
+   </xs:element>
+   <xs:element name="ID_KORESP_UMOWA_DEVELOPPER"
+               type="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP">
+      <xs:annotation>
+         <xs:documentation>Uzyte w MK Rewiry</xs:documentation>
+      </xs:annotation>
+   </xs:element>
    <xs:element name="ID_KORESP_PROJEKT_WYK"
                type="default_db__x3A__IN7_DZIENNIK_KORESP:ID_KORESP_PROJEKT"/>
    <xs:complexType name="ID_KORESP_OFFER">
@@ -580,7 +856,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
                <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                            maxOccurs="unbounded"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="P_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
                <xs:element name="A_RECORD_CREATE_AUTHOR"
                            minOccurs="0"
@@ -600,7 +886,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default=""
                            type="xs:string"/>
-               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="L_APPOITMENT_PERIOD"
                            minOccurs="0"
                            default="0"
@@ -646,7 +942,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
                <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
                <xs:element minOccurs="0"
-                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="K_TYP_RODZAJ"
                            minOccurs="0"
                            default="ZWYKLY"
@@ -662,7 +968,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default="0"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_USERS"
+                                                         system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -695,15 +1014,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
                <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-               <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                           minOccurs="0"
-                           default="0"
-                           type="xs:integer"/>
-               <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+               <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
                <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_ZASOB"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
                <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_DEVICE"
+                                                         system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
                <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"
                            default="0"
@@ -711,7 +1054,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"/>
                <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
                <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
                <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
                <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -733,18 +1076,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="1"
                            default="1"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
                <xs:element maxOccurs="unbounded"
                            ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                           minOccurs="1"/>
+                           minOccurs="1">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
             </xs:sequence>
          </xs:restriction>
       </xs:complexContent>
@@ -757,7 +1163,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element name="P_ID" minOccurs="0" default="0" type="xs:int"/>
                <xs:element ref="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP"
                            maxOccurs="unbounded"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="P_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__IN7_DZIENNIK_KORESP:IN7_DZIENNIK_KORESP/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="A_RECORD_CREATE_DATE" minOccurs="0" type="xs:dateTime"/>
                <xs:element name="A_RECORD_CREATE_AUTHOR"
                            minOccurs="0"
@@ -777,7 +1193,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default=""
                            type="xs:string"/>
-               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER" minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="L_APPOITMENT_USER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__ADMIN_USERS:L_APPOITMENT_USER/ADM_ACCOUNT"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="L_APPOITMENT_PERIOD"
                            minOccurs="0"
                            default="0"
@@ -823,7 +1249,17 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            type="default_db__x3A__IN7_DZIENNIK_KORESP:K_TYP_KORESP"/>
                <xs:element name="CRM_LISTA_ZASOBOW_ID" minOccurs="0" type="xs:integer"/>
                <xs:element minOccurs="0"
-                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID"/>
+                           ref="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="CRM_LISTA_ZASOBOW_ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:CRM_LISTA_ZASOBOW_ID/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="K_TYP_RODZAJ"
                            minOccurs="0"
                            default="ZWYKLY"
@@ -839,7 +1275,20 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="0"
                            default="0"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__COMPANIES:ID_BILLING_USERS">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_USERS"
+                                                         system_cache__appinfo:xpath="default_db__x3A__COMPANIES:ID_BILLING_USERS/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #3992 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element name="OD_KOGO_ADRES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOS" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="K_ZAWARTOSC_HTML" minOccurs="0" type="p5Type:text"/>
@@ -872,15 +1321,39 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__IN7_MK_BAZA_DYSTRYBUCJI:ID_PROJECT" minOccurs="0"/>
                <xs:element name="M_DIST_FILES" minOccurs="0" default="" type="xs:string"/>
                <xs:element name="P_ACCOUNT" minOccurs="0" type="xs:string"/>
-               <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID"
-                           minOccurs="0"
-                           default="0"
-                           type="xs:integer"/>
-               <xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>
+               <!--<xs:element minOccurs="0" ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID"/>-->
                <xs:element name="ID_ZASOB" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_ZASOB"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #51112 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB" minOccurs="0"/>-->
                <xs:element name="ID_DEVICE" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>
+               <xs:element ref="default_db__x3A__DEVICES:ID_DEVICE">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_DEVICE"
+                                                         system_cache__appinfo:xpath="default_db__x3A__DEVICES:ID_DEVICE/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #28a55 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__DEVICES:ID_DEVICE" minOccurs="0"/>-->
                <xs:element name="T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"
                            default="0"
@@ -888,7 +1361,7 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                <xs:element ref="default_db__x3A__TELBOXES:T_TELBOX_NEIGHBOUR_IN_ID_NEW"
                            minOccurs="0"/>
                <xs:element name="ID_ZASOB_NEW" minOccurs="0" type="xs:integer"/>
-               <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>
+               <!--<xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW:ID_ZASOB_NEW" minOccurs="0"/>-->
                <xs:element name="COST_VALUE" minOccurs="0" type="xs:decimal"/>
                <xs:element name="COST_MONTH" minOccurs="0" type="xs:date"/>
                <xs:element name="COST_TYPE" minOccurs="0" type="xs:string"/>
@@ -910,18 +1383,81 @@ Jest on w relacji w obiekcie default_object_types:KUWETA/SKOROSZYT</xs:documenta
                            minOccurs="1"
                            default="1"
                            type="xs:integer"/>
-               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>
+               <xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID_BILLING_OWNER"
+                                                         system_cache__appinfo:xpath="default_db__x3A__BILLING_OWNER:BILLING_OWNER/ID"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #4999 !!!
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
+               <!--<xs:element ref="default_db__x3A__BILLING_OWNER:BILLING_OWNER" minOccurs="1"/>-->
                <xs:element maxOccurs="unbounded"
                            ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Ground/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Infrastructure_Placement_Buildings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #5554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element maxOccurs="unbounded"
                            minOccurs="0"
-                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings"/>
+                           ref="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__InvestArrangements:InvestArrangements_Network_Crossings/ID_KORESP_INVEST_ARRANGEMENT_DEAL"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                     <xs:documentation>
+                    TODO CHECK IF THIS IS CORRECT FLAT RELATION! WAS GENERATED #55554
+                </xs:documentation>
+                  </xs:annotation>
+               </xs:element>
                <xs:element ref="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS"
-                           minOccurs="0"/>
+                           minOccurs="0">
+                  <xs:annotation>
+                     <xs:appinfo>
+                        <system_cache__appinfo:flat_relation_cache>
+                           <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"
+                                                         system_cache__appinfo:name="ID"
+                                                         system_cache__appinfo:xpath="default_db__x3A__CRM_LISTA_ZASOBOW_OFFERS:CRM_LISTA_ZASOBOW_OFFERS/ID_KORESP_OFFER"/>
+                        </system_cache__appinfo:flat_relation_cache>
+                     </xs:appinfo>
+                  </xs:annotation>
+               </xs:element>
             </xs:sequence>
          </xs:restriction>
       </xs:complexContent>

Різницю між файлами не показано, бо вона завелика
+ 842 - 217
SE/schema/ant-object/default_db.IN7_DZIENNIK_KORESP/IN7_DZIENNIK_KORESP/IN7_DZIENNIK_KORESP.xsd


+ 2 - 1
SE/schema/ant-object/default_db.MK_Rewiry/MK_Rewiry/MK_Rewiry.xsd

@@ -334,7 +334,8 @@
             <xs:annotation>
                <xs:appinfo>
                   <system_cache__appinfo:flat_relation_cache>
-                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view" system_cache__appinfo:name="NAZWA_REWI" system_cache__appinfo:xpath="default_db__x3A__SALES_PLAN:SALES_PLAN/"/>
+                     <system_cache__appinfo:source system_cache__appinfo:ref_engine="view" system_cache__appinfo:name="NAZWA_REWI" 
+                        system_cache__appinfo:xpath="default_db__x3A__SALES_PLAN:SALES_PLAN/"/>
                   </system_cache__appinfo:flat_relation_cache>
                </xs:appinfo>
             </xs:annotation>

+ 8 - 3
SE/schema/ant-object/default_db.SALES_PLAN/SALES_PLAN/SALES_PLAN.xsd

@@ -166,11 +166,16 @@ Protopyowy obiekt, który powinien mieć typy konkretnych rodzaji dla różnych
          </xs:element>
          <xs:element minOccurs="0" ref="default_db__x3A__MK_Rewiry:MK_Rewiry">
             <xs:annotation>
-               <xs:appinfo>
-               <system_cache__appinfo:flat_relation_cache system_cache__appinfo:backref_evaluate="true">
+               <!--<xs:appinfo>
+                 <system_cache__appinfo:flat_relation_cache system_cache__appinfo:backref_evaluate="true">
                   <system_cache__appinfo:source system_cache__appinfo:ref_engine="view"/>
                </system_cache__appinfo:flat_relation_cache>
-            </xs:appinfo>
+            </xs:appinfo>-->
+                  <xs:appinfo>
+                     <system_cache__appinfo:flat_relation_cache>
+                        <system_cache__appinfo:source system_cache__appinfo:ref_engine="view" system_cache__appinfo:name="NAZWA_REWI" system_cache__appinfo:xpath="default_db__x3A__MK_Rewiry:MK_Rewiry/NAZWA_REWI"/>
+                     </system_cache__appinfo:flat_relation_cache>
+                  </xs:appinfo>
             </xs:annotation>
          </xs:element>
       </xs:sequence>

Деякі файли не було показано, через те що забагато файлів було змінено