Re: svn commit: r924803 - in /ofbiz/branches/multitenant20100310/framework/entity/src/org/ofbiz/entity: GenericDelegator.java model/ModelGroupReader.java

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

Re: svn commit: r924803 - in /ofbiz/branches/multitenant20100310/framework/entity/src/org/ofbiz/entity: GenericDelegator.java model/ModelGroupReader.java

Scott Gray-2
On 18/03/2010, at 8:25 AM, [hidden email] wrote:

> Author: jonesde
> Date: Thu Mar 18 14:25:56 2010
> New Revision: 924803
>
> URL: http://svn.apache.org/viewvc?rev=924803&view=rev
> Log:
> Fixed issue with ant run-tests where funny delegator names are used that don't match the delegator name in the entityengine.xml file; now all cloned delegators use the same delegatorBaseName as the original so that configuration settings will work; also includes improved error handling when a bad delegator name is used to get default group name info for a delegator
>
> Modified:
>    ofbiz/branches/multitenant20100310/framework/entity/src/org/ofbiz/entity/GenericDelegator.java
>    ofbiz/branches/multitenant20100310/framework/entity/src/org/ofbiz/entity/model/ModelGroupReader.java
>
> Modified: ofbiz/branches/multitenant20100310/framework/entity/src/org/ofbiz/entity/GenericDelegator.java
> URL: http://svn.apache.org/viewvc/ofbiz/branches/multitenant20100310/framework/entity/src/org/ofbiz/entity/GenericDelegator.java?rev=924803&r1=924802&r2=924803&view=diff
> ==============================================================================
> --- ofbiz/branches/multitenant20100310/framework/entity/src/org/ofbiz/entity/GenericDelegator.java (original)
> +++ ofbiz/branches/multitenant20100310/framework/entity/src/org/ofbiz/entity/GenericDelegator.java Thu Mar 18 14:25:56 2010
> @@ -3245,6 +3245,9 @@ public class GenericDelegator implements
>         newDelegator.modelReader = this.modelReader;
>         newDelegator.modelGroupReader = this.modelGroupReader;
>         newDelegator.setDelegatorNames(UtilValidate.isNotEmpty(delegatorFullName) ? delegatorFullName : this.delegatorFullName);
> +        // set the delegatorBaseName to be the same so that configuration settings all work the same as the current
> +        //   delegator, allowing the new delegatorFullName to not match a delegator name in the entityengine.xml file
> +        newDelegator.delegatorBaseName = this.delegatorBaseName;
>         newDelegator.delegatorInfo = this.delegatorInfo;
>         newDelegator.cache = this.cache;
>         newDelegator.andCacheFieldSets = this.andCacheFieldSets;
Hi David,

I haven't looked at this change or the code in your branch in detail yet, but the existing code was already doing what looks to be the same thing using delegator.originalDelegatorName

Regards
Scott


smime.p7s (3K) Download Attachment