svn commit: r676933 - in /ofbiz/trunk: framework/entity/src/org/ofbiz/entity/ framework/entity/src/org/ofbiz/entity/datasource/ specialpurpose/assetmaint/ specialpurpose/assetmaint/entitydef/

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

svn commit: r676933 - in /ofbiz/trunk: framework/entity/src/org/ofbiz/entity/ framework/entity/src/org/ofbiz/entity/datasource/ specialpurpose/assetmaint/ specialpurpose/assetmaint/entitydef/

jacopoc
Author: jacopoc
Date: Tue Jul 15 07:59:56 2008
New Revision: 676933

URL: http://svn.apache.org/viewvc?rev=676933&view=rev
Log:
Fixed bug reported by Jacques Le Roux in the ML.
The issue was this: when all the entity-group entries for the default group ("org.ofbiz") are removed by all the components, the system was not considering the "org.ofbiz" group for the initialization of the data base.
Also removed the last entity-group definition for the assetmaint component (that was there as a workaround for the above bug).

Removed:
    ofbiz/trunk/specialpurpose/assetmaint/entitydef/entitygroup.xml
Modified:
    ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java
    ofbiz/trunk/framework/entity/src/org/ofbiz/entity/datasource/GenericDAO.java
    ofbiz/trunk/specialpurpose/assetmaint/ofbiz-component.xml

Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java?rev=676933&r1=676932&r2=676933&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java Tue Jul 15 07:59:56 2008
@@ -208,7 +208,12 @@
         }
 
         // initialize helpers by group
-        Iterator<String> groups = UtilMisc.toIterator(getModelGroupReader().getGroupNames());
+        Set groupNames = getModelGroupReader().getGroupNames();
+        if (groupNames != null) {
+            // Always add the default group name
+            groupNames.add(getDelegatorInfo().defaultGroupName);
+        }
+        Iterator<String> groups = UtilMisc.toIterator(groupNames);
         while (groups != null && groups.hasNext()) {
             String groupName = groups.next();
             String helperName = this.getGroupHelperName(groupName);

Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/datasource/GenericDAO.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/datasource/GenericDAO.java?rev=676933&r1=676932&r2=676933&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/datasource/GenericDAO.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/datasource/GenericDAO.java Tue Jul 15 07:59:56 2008
@@ -55,7 +55,7 @@
 import org.ofbiz.entity.util.EntityListIterator;
 
 /**
- * Generic Entity Data Access Object - Handles persisntence for any defined entity.
+ * Generic Entity Data Access Object - Handles persistence for any defined entity.
  *
  */
 public class GenericDAO {

Modified: ofbiz/trunk/specialpurpose/assetmaint/ofbiz-component.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/assetmaint/ofbiz-component.xml?rev=676933&r1=676932&r2=676933&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/assetmaint/ofbiz-component.xml (original)
+++ ofbiz/trunk/specialpurpose/assetmaint/ofbiz-component.xml Tue Jul 15 07:59:56 2008
@@ -33,7 +33,6 @@
 
     <!-- entity resources: model(s), eca(s), group, and data definitions -->
     <entity-resource type="model" reader-name="main" loader="main" location="entitydef/entitymodel.xml"/>
-    <entity-resource type="group" reader-name="main" loader="main" location="entitydef/entitygroup.xml"/>  
     <entity-resource type="data" reader-name="seed" loader="main" location="data/AssetMaintSecurityData.xml"/>
     <entity-resource type="data" reader-name="seed" loader="main" location="data/AssetMaintSeedData.xml"/>
     <entity-resource type="data" reader-name="demo" loader="main" location="data/AssetMaintDemoData.xml"/>