svn commit: r1762997 - in /ofbiz/branches: release13.07/applications/content/script/org/ofbiz/content/data/ release13.07/applications/content/servicedef/ release14.12/applications/content/script/org/ofbiz/content/data/ release14.12/applications/content...

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

svn commit: r1762997 - in /ofbiz/branches: release13.07/applications/content/script/org/ofbiz/content/data/ release13.07/applications/content/servicedef/ release14.12/applications/content/script/org/ofbiz/content/data/ release14.12/applications/content...

jleroux@apache.org
Author: jleroux
Date: Sat Oct  1 10:18:06 2016
New Revision: 1762997

URL: http://svn.apache.org/viewvc?rev=1762997&view=rev
Log:
"Applied fix from trunk for revision: 1762996  " (conflicts handled by hand)
------------------------------------------------------------------------
r1762996 | jleroux | 2016-10-01 12:12:55 +0200 (sam. 01 oct. 2016) | 13 lignes

Fixes: Error : Column 'DATA_CATEGORY_ID' cannot accept a NULL value
(OFBIZ-8282)

Steps to regenerate :
1) Login into webtools component.
2) Run "createDataCategory" service without passing any parameter.
3) Following error message occured : (Column 'DATA_CATEGORY_ID' cannot accept
a NULL value) PFA attached screenshot.

In this patch I have changed service engine to "entity-auto" and removed
service implementation.

Thanks: Pawan Verma
------------------------------------------------------------------------

Modified:
    ofbiz/branches/release13.07/applications/content/script/org/ofbiz/content/data/DataServices.xml
    ofbiz/branches/release13.07/applications/content/servicedef/services.xml
    ofbiz/branches/release14.12/applications/content/script/org/ofbiz/content/data/DataServices.xml
    ofbiz/branches/release14.12/applications/content/servicedef/services.xml
    ofbiz/branches/release15.12/applications/content/script/org/ofbiz/content/data/DataServices.xml
    ofbiz/branches/release15.12/applications/content/servicedef/services.xml

Modified: ofbiz/branches/release13.07/applications/content/script/org/ofbiz/content/data/DataServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/content/script/org/ofbiz/content/data/DataServices.xml?rev=1762997&r1=1762996&r2=1762997&view=diff
==============================================================================
--- ofbiz/branches/release13.07/applications/content/script/org/ofbiz/content/data/DataServices.xml (original)
+++ ofbiz/branches/release13.07/applications/content/script/org/ofbiz/content/data/DataServices.xml Sat Oct  1 10:18:06 2016
@@ -207,13 +207,6 @@ under the License.
     </simple-method>
 
   <!-- Methods for DataCategory -->
-    <simple-method method-name="createDataCategory" short-description="Create Data Category">
-        <make-value entity-name="DataCategory" value-field="newEntity"/>
-        <set-nonpk-fields map="parameters" value-field="newEntity"/>
-        <set-pk-fields map="parameters" value-field="newEntity"/>
-        <create-value value-field="newEntity"/>
-        <field-to-result result-name="dataCategoryId" field="newEntity.dataCategoryId"/>
-    </simple-method>
     <simple-method method-name="updateDataCategory" short-description="Update Data Category">
         <make-value entity-name="DataCategory" value-field="lookupKeyValue"/>
         <set-pk-fields map="parameters" value-field="lookupKeyValue"/>

Modified: ofbiz/branches/release13.07/applications/content/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/content/servicedef/services.xml?rev=1762997&r1=1762996&r2=1762997&view=diff
==============================================================================
--- ofbiz/branches/release13.07/applications/content/servicedef/services.xml (original)
+++ ofbiz/branches/release13.07/applications/content/servicedef/services.xml Sat Oct  1 10:18:06 2016
@@ -80,11 +80,10 @@
     </service>
 
     <!-- DataCategory services -->
-    <service name="createDataCategory" engine="simple" default-entity-name="DataCategory" auth="true"
-            location="component://content/script/org/ofbiz/content/data/DataServices.xml" invoke="createDataCategory">
+    <service name="createDataCategory" engine="entity-auto" default-entity-name="DataCategory" auth="true" invoke="create">
         <description>Create a DataCategory</description>
         <permission-service service-name="contentManagerPermission" main-action="CREATE"/>
-        <auto-attributes include="pk" mode="INOUT" optional="true"/>
+        <auto-attributes include="pk" mode="INOUT" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
     <service name="updateDataCategory" engine="simple" default-entity-name="DataCategory" auth="true"

Modified: ofbiz/branches/release14.12/applications/content/script/org/ofbiz/content/data/DataServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release14.12/applications/content/script/org/ofbiz/content/data/DataServices.xml?rev=1762997&r1=1762996&r2=1762997&view=diff
==============================================================================
--- ofbiz/branches/release14.12/applications/content/script/org/ofbiz/content/data/DataServices.xml (original)
+++ ofbiz/branches/release14.12/applications/content/script/org/ofbiz/content/data/DataServices.xml Sat Oct  1 10:18:06 2016
@@ -207,13 +207,6 @@ under the License.
     </simple-method>
 
   <!-- Methods for DataCategory -->
-    <simple-method method-name="createDataCategory" short-description="Create Data Category">
-        <make-value entity-name="DataCategory" value-field="newEntity"/>
-        <set-nonpk-fields map="parameters" value-field="newEntity"/>
-        <set-pk-fields map="parameters" value-field="newEntity"/>
-        <create-value value-field="newEntity"/>
-        <field-to-result result-name="dataCategoryId" field="newEntity.dataCategoryId"/>
-    </simple-method>
     <simple-method method-name="updateDataCategory" short-description="Update Data Category">
         <make-value entity-name="DataCategory" value-field="lookupKeyValue"/>
         <set-pk-fields map="parameters" value-field="lookupKeyValue"/>

Modified: ofbiz/branches/release14.12/applications/content/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release14.12/applications/content/servicedef/services.xml?rev=1762997&r1=1762996&r2=1762997&view=diff
==============================================================================
--- ofbiz/branches/release14.12/applications/content/servicedef/services.xml (original)
+++ ofbiz/branches/release14.12/applications/content/servicedef/services.xml Sat Oct  1 10:18:06 2016
@@ -80,11 +80,10 @@
     </service>
 
     <!-- DataCategory services -->
-    <service name="createDataCategory" engine="simple" default-entity-name="DataCategory" auth="true"
-            location="component://content/script/org/ofbiz/content/data/DataServices.xml" invoke="createDataCategory">
+    <service name="createDataCategory" engine="entity-auto" default-entity-name="DataCategory" auth="true" invoke="create">
         <description>Create a DataCategory</description>
         <permission-service service-name="contentManagerPermission" main-action="CREATE"/>
-        <auto-attributes include="pk" mode="INOUT" optional="true"/>
+        <auto-attributes include="pk" mode="INOUT" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
     <service name="updateDataCategory" engine="simple" default-entity-name="DataCategory" auth="true"

Modified: ofbiz/branches/release15.12/applications/content/script/org/ofbiz/content/data/DataServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release15.12/applications/content/script/org/ofbiz/content/data/DataServices.xml?rev=1762997&r1=1762996&r2=1762997&view=diff
==============================================================================
--- ofbiz/branches/release15.12/applications/content/script/org/ofbiz/content/data/DataServices.xml (original)
+++ ofbiz/branches/release15.12/applications/content/script/org/ofbiz/content/data/DataServices.xml Sat Oct  1 10:18:06 2016
@@ -119,13 +119,6 @@ under the License.
     </simple-method>
 
   <!-- Methods for DataCategory -->
-    <simple-method method-name="createDataCategory" short-description="Create Data Category">
-        <make-value entity-name="DataCategory" value-field="newEntity"/>
-        <set-nonpk-fields map="parameters" value-field="newEntity"/>
-        <set-pk-fields map="parameters" value-field="newEntity"/>
-        <create-value value-field="newEntity"/>
-        <field-to-result result-name="dataCategoryId" field="newEntity.dataCategoryId"/>
-    </simple-method>
     <simple-method method-name="updateDataCategory" short-description="Update Data Category">
         <make-value entity-name="DataCategory" value-field="lookupKeyValue"/>
         <set-pk-fields map="parameters" value-field="lookupKeyValue"/>

Modified: ofbiz/branches/release15.12/applications/content/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release15.12/applications/content/servicedef/services.xml?rev=1762997&r1=1762996&r2=1762997&view=diff
==============================================================================
--- ofbiz/branches/release15.12/applications/content/servicedef/services.xml (original)
+++ ofbiz/branches/release15.12/applications/content/servicedef/services.xml Sat Oct  1 10:18:06 2016
@@ -80,11 +80,10 @@
     </service>
 
     <!-- DataCategory services -->
-    <service name="createDataCategory" engine="simple" default-entity-name="DataCategory" auth="true"
-            location="component://content/script/org/ofbiz/content/data/DataServices.xml" invoke="createDataCategory">
+    <service name="createDataCategory" engine="entity-auto" default-entity-name="DataCategory" auth="true" invoke="create">
         <description>Create a DataCategory</description>
         <permission-service service-name="contentManagerPermission" main-action="CREATE"/>
-        <auto-attributes include="pk" mode="INOUT" optional="true"/>
+        <auto-attributes include="pk" mode="INOUT" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
     <service name="updateDataCategory" engine="simple" default-entity-name="DataCategory" auth="true"