[jira] [Created] (OFBIZ-5503) New not-null/pk columns created nullable

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (OFBIZ-5503) New not-null/pk columns created nullable

Nicolas Malin (Jira)
Simone Viani created OFBIZ-5503:
-----------------------------------

             Summary: New not-null/pk columns created nullable
                 Key: OFBIZ-5503
                 URL: https://issues.apache.org/jira/browse/OFBIZ-5503
             Project: OFBiz
          Issue Type: Bug
          Components: framework
    Affects Versions: SVN trunk
            Reporter: Simone Viani


Newly not-nullable or pk fields are always created as nullable columns
in the database, they are correctly created only with new tables.

See differences in:
{code}
org.ofbiz.entity.jdbc.DatabaseUtil.createTable(ModelEntity, Map<String, ModelEntity>, boolean)
org.ofbiz.entity.jdbc.DatabaseUtil.addColumn(ModelEntity, ModelField)
{code}

Method addColumn is missing the following:
{code}
if (field.getIsNotNull() || field.getIsPk()) { ... }
{code}




--
This message was sent by Atlassian JIRA
(v6.1.5#6160)