6 Replies Latest reply: Oct 4, 2013 3:55 AM by RahulV RSS

    Missing a src id property in item-descriptor

    PraveenKanthPR

      Hi

      I'm getting the below warning. Have anyone come across this warning.

      **** Warning /xyz/drug/repository/DrugRepository  Missing a src id property in item-descriptor drugProduct's table named CVS_GS_PRODUCT_IMAGE whose column-names are PRODUCT_ID

       

      Thanks

      Praveen

       

      XML

       

      <item-descriptor name="drugProduct"  id-space-name="drugProduct" display-name-resource="drugProduct" cache-mode="simple"  >
      <table name="GS_PRODUCT" type="primary" id-column-name="PRODUCT_ID">
      <property name="productId" data-type="int" column-name="PRODUCT_ID" required="true" queryable="true" readable="true" writable="false" display-name-resource="Product Id"/>
      <property name="ndc9Id" data-type="string" column-name="NDC9_ID" required="true" queryable="true" readable="true" writable="false" display-name-resource="Product Id"/>
      <property name="productNameLong" data-type="string" column-name="PRODUCT_LONG_NAME" required="true" queryable="true" readable="true" writable="false" display-name-resource="Product Long Name"/>
      </table>
      <table name="CVS_GS_PRODUCT_IMAGE" type="multi" id-column-name="PRODUCT_ID">
      <property category-resource="drugImageInfoResource"  cascade="delete" name="drugImage" display-name-resource="Image Id" column-name="IMAGE_ID" data-type="set" component-item-type="drugImage" />
      </table>

      </item-descriptor>

       

       

      <item-descriptor name="productImage" id-space-name="productImage" display-name-resource="productImage"  cache-mode="simple">

      <table name="CVS_GS_PRODUCT_IMAGE" type="primary" id-column-name="PRODUCT_ID">
      <property name="imageId" data-type="int" column-name="IMAGE_ID" required="true" queryable="true" readable="true" writable="false" display-name-resource="IMAGE Id"/>
      <property name="productId" data-type="int" column-name="PRODUCT_ID" required="true" queryable="true" readable="true" writable="false" display-name-resource="Product Id"/>
      </table>

      </item-descriptor>

        • 1. Re: Missing a src id property in item-descriptor
          Gopinath Ramasamy

          Hi Praveen,

           

          Try adding the PRODUCT_ID as a property explicitly in the table CVS_GS_PRODUCT_IMAGE in the drugProduct item descriptor and check.

           

          PRODUCT_ID is mentioned as the id-column-name for this table but is not explicitly defined inside the table.

           

          Hope this helps.

          Keep posting the updates / questions.

           

          Thanks,

          Gopinath Ramasamy

          • 2. Re: Missing a src id property in item-descriptor
            PraveenKanthPR

            Gopi,

             

            It didn't work, adding the primary key mapping tables and drugImage item-descriptor for reference.

             

            Primary Key mappings for 3 tables are as below.

            GS_PRODUCT

                 - PRODUCT_ID

            CVS_GS_PRODUCT_IMAGE

                 -PRODUCT_ID

                 -IMAGE_ID

            CVS_GS_IMAGE_LIST

                 -IMAGE_ID


            drugImage item-descriptor

            <item-descriptor name="drugImage" id-space-name="drugImage" display-name-resource="drugImage"  >

              <table name="CVS_GS_IMAGE_LIST" type="primary" id-column-name="IMAGE_ID">

              <property category-resource="drugImageInfoResource" name="imageId" data-type="int" column-name="IMAGE_ID" display-name-resource="Image Id"/>

              <property category-resource="drugImageInfoResource" name="imageFileName" data-type="string" column-name="IMAGE_FILE_NAME" display-name-resource="Image File Name"/>

              <property category-resource="drugImageInfoResource" name="imageDrugName" data-type="string" column-name="IMAGE_DRUG_NAME" display-name-resource="Image Drug Name" />

              </table>

            </item-descriptor>




            • 3. Re: Missing a src id property in item-descriptor
              Gopinath Ramasamy

              Hi,

               

              Can you provide the repository definition which includes all these three tables?

               

              Also, please provide the complete warning log when this repository is started or referred.

               

              Thanks,

              Gopi

              • 4. Re: Missing a src id property in item-descriptor
                PraveenKanthPR

                Warning logs:

                2013-09-23 23:22:37,516 WARN  [nucleusNamespace.xyz.drug.repository.DrugInformationRepository] Warning - table: CVS_GS_PRODUCT_IMAGE appears in item descriptors: productImage and drugProduct but not using a pattern recognized by the GSA table invalidation mechanism.  Cached values from this table will not be updated when drugProduct's properties are modified.  These properties for this table are: [imageId,productId]

                2013-09-23 23:22:37,516 WARN  [nucleusNamespace.xyz.drug.repository.DrugInformationRepository] Missing a src id property in item-descriptor drugProduct's table named CVS_GS_PRODUCT_IMAGE whose column-names are PRODUCT_ID

                2013-09-23 23:22:37,516 WARN  [nucleusNamespace.xyz.drug.repository.DrugInformationRepository] The property in item-descriptor productImage named productId is read only.

                2013-09-23 23:22:37,517 INFO  [nucleusNamespace.xyz.drug.repository.DrugInformationRepository] SQL Repository startup complete

                 

                Repository

                <item-descriptor name="drugProduct"  id-space-name="drugProduct" display-name-resource="drugProduct" cache-mode="simple"  item-cache-size="5000">
                <table name="GS_PRODUCT" type="primary" id-column-name="PRODUCT_ID">
                <property name="productId" data-type="int" column-name="PRODUCT_ID" required="true" queryable="true" readable="true" writable="false" display-name-resource="Product Id"/>
                <property name="ndc9Id" data-type="string" column-name="NDC9_ID" required="true" queryable="true" readable="true" writable="false" display-name-resource="Product Id"/>
                <property name="productNameLong" data-type="string" column-name="PRODUCT_LONG_NAME" required="true" queryable="true" readable="true" writable="false" display-name-resource="Product Long Name"/>
                </table>
                <table name="CVS_GS_PRODUCT_IMAGE" type="multi" id-column-name="PRODUCT_ID">
                     <property category-resource="drugImageInfoResource"  cascade="delete" name="drugImage" display-name-resource="Image Id" column-name="IMAGE_ID" data-type="set" component-item-type="drugImage" />
                </table>

                </item-descriptor>

                 

                 

                <item-descriptor name="drugImage" id-space-name="drugImage" display-name-resource="drugImage"  cache-mode="simple" item-cache-size="10000">

                <table name="CVS_GS_IMAGE_LIST" type="primary" id-column-name="IMAGE_ID">
                <property category-resource="drugImageInfoResource" name="imageId" data-type="int" column-name="IMAGE_ID" display-name-resource="Image Id" required="true" queryable="true" readable="true" writable="false"/>
                <property category-resource="drugImageInfoResource" name="imageFileName" data-type="string" column-name="IMAGE_FILE_NAME" display-name-resource="Image File Name" required="true" queryable="true" readable="true" writable="false"/>
                <property category-resource="drugImageInfoResource" name="imageDrugName" data-type="string" column-name="IMAGE_DRUG_NAME" display-name-resource="Image Drug Name" required="true" queryable="true" readable="true" writable="false"/>
                </table>

                </item-descriptor>

                • 5. Re: Missing a src id property in item-descriptor
                  Gopinath Ramasamy

                  Hi Praveen,

                   

                  I infer the tables mentioned in this issue represents two entities Product and Image which has Many-to-Many relationship.

                   

                  With this, ideally, the repository definitions would be as below:

                   

                  
                  
                  
                  <item-descriptor name="drugProduct"  id-space-name="drugProduct" display-name-resource="drugProduct" cache-mode="simple"  item-cache-size="5000">
                  
                  
                  
                  
                  <table name="GS_PRODUCT" type="primary" id-column-name="PRODUCT_ID">
                  
                  
                  
                  
                  <property name="productId" data-type="int" column-name="PRODUCT_ID" required="true" queryable="true" readable="true" writable="false" display-name-resource="Product Id"/>
                  
                  
                  
                  
                  <property name="ndc9Id" data-type="string" column-name="NDC9_ID" required="true" queryable="true" readable="true" writable="false" display-name-resource="Product Id"/>
                  
                  
                  
                  
                  <property name="productNameLong" data-type="string" column-name="PRODUCT_LONG_NAME" required="true" queryable="true" readable="true" writable="false" display-name-resource="Product Long Name"/>
                  
                  
                  
                  </table>
                  
                  
                  
                  
                  
                  <table name="CVS_GS_PRODUCT_IMAGE" type="multi" id-column-name="PRODUCT_ID">
                  
                  
                  
                  
                  <property category-resource="drugImageInfoResource"  cascade="delete" name="drugImage" display-name-resource="Image Id" column-name="IMAGE_ID" data-type="set" component-item-type="drugImage" />
                  
                  
                  
                  </table>
                  
                  
                  
                  </item-descriptor>
                  <item-descriptor name="drugImage" id-space-name="drugImage" display-name-resource="drugImage"  cache-mode="simple" item-cache-size="10000">
                  
                  
                  
                  
                  <table name="CVS_GS_IMAGE_LIST" type="primary" id-column-name="IMAGE_ID">
                  
                  
                  
                  
                  
                  <property category-resource="drugImageInfoResource" name="imageId" data-type="int" column-name="IMAGE_ID" display-name-resource="Image Id" required="true" queryable="true" readable="true" writable="false"/>
                  
                  
                  
                  
                  <property category-resource="drugImageInfoResource" name="imageFileName" data-type="string" column-name="IMAGE_FILE_NAME" display-name-resource="Image File Name" required="true" queryable="true" readable="true" writable="false"/>
                  
                  
                  
                  
                  <property category-resource="drugImageInfoResource" name="imageDrugName" data-type="string" column-name="IMAGE_DRUG_NAME" display-name-resource="Image Drug Name" required="true" queryable="true" readable="true" writable="false"/>
                  
                  
                  
                  </table>
                  
                  
                  
                  
                  <table name="CVS_GS_PRODUCT_IMAGE" type="multi" id-column-name="IMAGE_ID">
                  
                  
                  
                  
                  
                  <property category-resource="drugProductInfoResource"  cascade="delete" name="drugProduct" display-name-resource="Product Id" column-name="PRODUCT_ID" data-type="set" component-item-type="drugProduct" />
                  
                  
                  
                  </table>
                  
                  
                  
                  
                  </item-descriptor>
                  
                  

                   

                   

                  Please check with this definition updated in the repository file and check the logs.

                   

                  Keep posting the updates.

                   

                  Thanks,

                  Gopinath Ramasamy

                  • 6. Re: Missing a src id property in item-descriptor
                    RahulV

                    Hi,

                     

                    Instead of id-column-name please use id-column-names for the multi type table.

                     

                    Regards,

                    RahulV