Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-13163

SQL Exception in GenericEntity.checkFks for fields with not-null="true"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: In Progress
    • Major
    • Resolution: Unresolved
    • 18.12.16
    • None
    • framework/entity
    • None

    Description

      Entities with field attribute not-null="true", for fields that are not "prim-key" or "relation"
      Cause GenericEntity.checkFks to throw "SQL Exception while executing the following:INSERT" for the valid data.

      How to reproduce:
      create Entity with field attribute not-null="true", for field that is not "prim-key" or "relation"
      (sample "entitymodel_sample.xml" attached)
      invoke "parseEntityXmlFile" from "org.apache.ofbiz.webtools.WebToolsServices" with "createDummyFks" set to "Y"
      (sample code "sample.java", service settings "service.xml" and restore data "BACKUP_SAMPLE.xml" attached)

      Attachments

        1. entitymodel_sample.xml
          1 kB
          Dimitri
        2. BACKUP_SAMPLE.xml
          0.5 kB
          Dimitri
        3. sample.java
          0.6 kB
          Dimitri
        4. services.xml
          2 kB
          Dimitri

        Activity

          People

            jleroux Jacques Le Roux
            cetebuk Dimitri
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: