You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Adrian Crum <ad...@hlmksw.com> on 2009/04/15 01:42:28 UTC

Re: svn commit: r764947 - /ofbiz/trunk/framework/entity/config/entityengine.xml

If this was done to accommodate the UEL auto-vivify problem, it can be 
reverted.

-Adrian

jonesde@apache.org wrote:
> Author: jonesde
> Date: Tue Apr 14 20:50:23 2009
> New Revision: 764947
> 
> URL: http://svn.apache.org/viewvc?rev=764947&view=rev
> Log:
> Small change to have a prefix for all sequenced IDs by default
> 
> Modified:
>     ofbiz/trunk/framework/entity/config/entityengine.xml
> 
> Modified: ofbiz/trunk/framework/entity/config/entityengine.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/config/entityengine.xml?rev=764947&r1=764946&r2=764947&view=diff
> ==============================================================================
> --- ofbiz/trunk/framework/entity/config/entityengine.xml (original)
> +++ ofbiz/trunk/framework/entity/config/entityengine.xml Tue Apr 14 20:50:23 2009
> @@ -49,21 +49,21 @@
>      <!-- the connection factory class to use, one is needed for obtaining connections/pools for defined resources -->
>      <connection-factory class="org.ofbiz.entity.connection.DBCPConnectionFactory"/>
>  
> -    <delegator name="default" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main" distributed-cache-clear-enabled="false">
> +    <delegator name="default" sequenced-id-prefix="OFB" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main" distributed-cache-clear-enabled="false">
>          <group-map group-name="org.ofbiz" datasource-name="localderby"/>
>          <group-map group-name="org.ofbiz.olap" datasource-name="localderbyolap"/>
>      </delegator>
> -    <delegator name="default-no-eca" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main" entity-eca-enabled="false" distributed-cache-clear-enabled="false">
> +    <delegator name="default-no-eca" sequenced-id-prefix="OFB" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main" entity-eca-enabled="false" distributed-cache-clear-enabled="false">
>          <group-map group-name="org.ofbiz" datasource-name="localderby"/>
>          <group-map group-name="org.ofbiz.olap" datasource-name="localderbyolap"/>
>      </delegator>
>  
>      <!-- be sure that your default delegator (or the one you use) uses the same datasource for test. You must run "ant run-install" before running "ant run-tests" -->
> -    <delegator name="test" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main">
> +    <delegator name="test" sequenced-id-prefix="OFB" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main">
>          <group-map group-name="org.ofbiz" datasource-name="localderby"/>
>          <group-map group-name="org.ofbiz.olap" datasource-name="localderbyolap"/>
>      </delegator>
> -    <delegator name="other" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main">
> +    <delegator name="other" sequenced-id-prefix="OFB" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main">
>          <group-map group-name="org.ofbiz" datasource-name="localpostgres"/>
>      </delegator>
>  
> 
> 
> 

Re: svn commit: r764947 - /ofbiz/trunk/framework/entity/config/entityengine.xml

Posted by Jacques Le Roux <ja...@les7arts.com>.
Yes I know that indeed

Jacques

From: "David E Jones" <da...@hotwaxmedia.com>
> 
> That's basically what it is now. The option has been there for many  
> years in fact.
> 
> -David
> 
> 
> On Apr 15, 2009, at 2:09 PM, Jacques Le Roux wrote:
> 
>> Maybe we could use a parameter for that and not by default ?
>>
>> Jacques
>>
>> From: "David E Jones" <da...@hotwaxmedia.com>
>>> On Apr 15, 2009, at 1:32 PM, Adam Heath wrote:
>>>> David E Jones wrote:
>>>>>
>>>>> This was indeed done to help with that, but I think I like it  
>>>>> anyway.
>>>>> The overall effect is that it distinguishes the IDs from other   
>>>>> sources,
>>>>> etc. On the other hand... maybe it's a little ugly?
>>>>
>>>> It's actually quite nice when you deploy a website on a developer
>>>> machine, a preview system, and a production machine.  If the code is
>>>> creating files that have to match up with an auto-generated id, and
>>>> said files are *also* commited into revision control, having a
>>>> per-machine prefix makes everything function a lot smoother.
>>> That's a good point. With that you could also easily identify  
>>> staging  data that accidently makes it into the production server  
>>> and fairly  easily eliminate it too.
>>> -David
>>>
>>
>


Re: svn commit: r764947 - /ofbiz/trunk/framework/entity/config/entityengine.xml

Posted by David E Jones <da...@hotwaxmedia.com>.
That's basically what it is now. The option has been there for many  
years in fact.

-David


On Apr 15, 2009, at 2:09 PM, Jacques Le Roux wrote:

> Maybe we could use a parameter for that and not by default ?
>
> Jacques
>
> From: "David E Jones" <da...@hotwaxmedia.com>
>> On Apr 15, 2009, at 1:32 PM, Adam Heath wrote:
>>> David E Jones wrote:
>>>>
>>>> This was indeed done to help with that, but I think I like it  
>>>> anyway.
>>>> The overall effect is that it distinguishes the IDs from other   
>>>> sources,
>>>> etc. On the other hand... maybe it's a little ugly?
>>>
>>> It's actually quite nice when you deploy a website on a developer
>>> machine, a preview system, and a production machine.  If the code is
>>> creating files that have to match up with an auto-generated id, and
>>> said files are *also* commited into revision control, having a
>>> per-machine prefix makes everything function a lot smoother.
>> That's a good point. With that you could also easily identify  
>> staging  data that accidently makes it into the production server  
>> and fairly  easily eliminate it too.
>> -David
>>
>


Re: svn commit: r764947 - /ofbiz/trunk/framework/entity/config/entityengine.xml

Posted by Jacques Le Roux <ja...@les7arts.com>.
Maybe we could use a parameter for that and not by default ?

Jacques

From: "David E Jones" <da...@hotwaxmedia.com>
> On Apr 15, 2009, at 1:32 PM, Adam Heath wrote:
> 
>> David E Jones wrote:
>>>
>>> This was indeed done to help with that, but I think I like it anyway.
>>> The overall effect is that it distinguishes the IDs from other  
>>> sources,
>>> etc. On the other hand... maybe it's a little ugly?
>>
>> It's actually quite nice when you deploy a website on a developer
>> machine, a preview system, and a production machine.  If the code is
>> creating files that have to match up with an auto-generated id, and
>> said files are *also* commited into revision control, having a
>> per-machine prefix makes everything function a lot smoother.
> 
> That's a good point. With that you could also easily identify staging  
> data that accidently makes it into the production server and fairly  
> easily eliminate it too.
> 
> -David
>


Re: svn commit: r764947 - /ofbiz/trunk/framework/entity/config/entityengine.xml

Posted by David E Jones <da...@hotwaxmedia.com>.
On Apr 15, 2009, at 1:32 PM, Adam Heath wrote:

> David E Jones wrote:
>>
>> This was indeed done to help with that, but I think I like it anyway.
>> The overall effect is that it distinguishes the IDs from other  
>> sources,
>> etc. On the other hand... maybe it's a little ugly?
>
> It's actually quite nice when you deploy a website on a developer
> machine, a preview system, and a production machine.  If the code is
> creating files that have to match up with an auto-generated id, and
> said files are *also* commited into revision control, having a
> per-machine prefix makes everything function a lot smoother.

That's a good point. With that you could also easily identify staging  
data that accidently makes it into the production server and fairly  
easily eliminate it too.

-David


Re: svn commit: r764947 - /ofbiz/trunk/framework/entity/config/entityengine.xml

Posted by Adam Heath <do...@brainfood.com>.
David E Jones wrote:
> 
> This was indeed done to help with that, but I think I like it anyway.
> The overall effect is that it distinguishes the IDs from other sources,
> etc. On the other hand... maybe it's a little ugly?

It's actually quite nice when you deploy a website on a developer
machine, a preview system, and a production machine.  If the code is
creating files that have to match up with an auto-generated id, and
said files are *also* commited into revision control, having a
per-machine prefix makes everything function a lot smoother.

Re: svn commit: r764947 - /ofbiz/trunk/framework/entity/config/entityengine.xml

Posted by Adrian Crum <ad...@yahoo.com>.
Please. Let's hold off on that.

My conversation with David made me refer back to the UEL specification - and I'm pretty sure my recent commit does a better job of combining UEL syntax with the OFBiz extensions.

I want the UEL integration to work with existing code as much as possible. Please revert it and let's see what happens. There is a good chance nothing goes wrong.

-Adrian


--- On Tue, 4/14/09, Jacques Le Roux <ja...@les7arts.com> wrote:

> From: Jacques Le Roux <ja...@les7arts.com>
> Subject: Re: svn commit: r764947 - /ofbiz/trunk/framework/entity/config/entityengine.xml
> To: dev@ofbiz.apache.org
> Date: Tuesday, April 14, 2009, 11:52 PM
> Do we really need that ? I think that adding a prefix when
> it comes from an external source is enough.
> 
> Jacques
> 
> From: "David E Jones"
> <da...@hotwaxmedia.com>
> > This was indeed done to help with that, but I think I
> like it anyway.  The overall effect is that it distinguishes
> the IDs from other  sources, etc. On the other hand... maybe
> it's a little ugly?
> > 
> > -David
> > 
> > 
> > On Apr 14, 2009, at 5:42 PM, Adrian Crum wrote:
> > 
> >> If this was done to accommodate the UEL
> auto-vivify problem, it can  be reverted.
> >> 
> >> -Adrian
> >> 
> >> jonesde@apache.org wrote:
> >>> Author: jonesde
> >>> Date: Tue Apr 14 20:50:23 2009
> >>> New Revision: 764947
> >>> URL:
> http://svn.apache.org/viewvc?rev=764947&view=rev
> >>> Log:
> >>> Small change to have a prefix for all
> sequenced IDs by default
> >>> Modified:
> >>>   
> ofbiz/trunk/framework/entity/config/entityengine.xml
> >>> Modified:
> ofbiz/trunk/framework/entity/config/entityengine.xml
> >>> URL:
> http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/config/entityengine.xml?rev=764947&r1=764946&r2=764947&view=diff
> >>> = = = = = = = = =
> =====================================================================
> >>> ---
> ofbiz/trunk/framework/entity/config/entityengine.xml
> (original)
> >>> +++
> ofbiz/trunk/framework/entity/config/entityengine.xml Tue Apr
> 14  20:50:23 2009
> >>> @@ -49,21 +49,21 @@
> >>>     <!-- the connection factory class to
> use, one is needed for  obtaining connections/pools for
> defined resources -->
> >>>     <connection-factory 
> class="org.ofbiz.entity.connection.DBCPConnectionFactory"/>
> >>> -    <delegator name="default"
> entity-model-reader="main" entity-
> group-reader="main"
> entity-eca-reader="main" distributed-cache-
> clear-enabled="false">
> >>> +    <delegator name="default"
> sequenced-id-prefix="OFB" entity-
> model-reader="main"
> entity-group-reader="main" entity-eca-
> reader="main"
> distributed-cache-clear-enabled="false">
> >>>         <group-map
> group-name="org.ofbiz" datasource-
> name="localderby"/>
> >>>         <group-map
> group-name="org.ofbiz.olap" datasource-
> name="localderbyolap"/>
> >>>     </delegator>
> >>> -    <delegator
> name="default-no-eca"
> entity-model-reader="main" 
> entity-group-reader="main"
> entity-eca-reader="main" entity-eca-
> enabled="false"
> distributed-cache-clear-enabled="false">
> >>> +    <delegator
> name="default-no-eca"
> sequenced-id-prefix="OFB" 
> entity-model-reader="main"
> entity-group-reader="main" entity-eca-
> reader="main" entity-eca-enabled="false"
> distributed-cache-clear- enabled="false">
> >>>         <group-map
> group-name="org.ofbiz" datasource-
> name="localderby"/>
> >>>         <group-map
> group-name="org.ofbiz.olap" datasource-
> name="localderbyolap"/>
> >>>     </delegator>
> >>>      <!-- be sure that your default
> delegator (or the one you use)  uses the same datasource for
> test. You must run "ant run-install"  before
> running "ant run-tests" -->
> >>> -    <delegator name="test"
> entity-model-reader="main" entity-group-
> reader="main"
> entity-eca-reader="main">
> >>> +    <delegator name="test"
> sequenced-id-prefix="OFB" entity-model-
> reader="main" entity-group-reader="main"
> entity-eca-reader="main">
> >>>         <group-map
> group-name="org.ofbiz" datasource-
> name="localderby"/>
> >>>         <group-map
> group-name="org.ofbiz.olap" datasource-
> name="localderbyolap"/>
> >>>     </delegator>
> >>> -    <delegator name="other"
> entity-model-reader="main" entity-
> group-reader="main"
> entity-eca-reader="main">
> >>> +    <delegator name="other"
> sequenced-id-prefix="OFB" entity-model-
> reader="main" entity-group-reader="main"
> entity-eca-reader="main">
> >>>         <group-map
> group-name="org.ofbiz" datasource-
> name="localpostgres"/>
> >>>     </delegator>
> >>> 
> >


      

Re: svn commit: r764947 - /ofbiz/trunk/framework/entity/config/entityengine.xml

Posted by Jacques Le Roux <ja...@les7arts.com>.
Do we really need that ? I think that adding a prefix when it comes from an external source is enough.

Jacques

From: "David E Jones" <da...@hotwaxmedia.com>
> This was indeed done to help with that, but I think I like it anyway.  
> The overall effect is that it distinguishes the IDs from other  
> sources, etc. On the other hand... maybe it's a little ugly?
> 
> -David
> 
> 
> On Apr 14, 2009, at 5:42 PM, Adrian Crum wrote:
> 
>> If this was done to accommodate the UEL auto-vivify problem, it can  
>> be reverted.
>>
>> -Adrian
>>
>> jonesde@apache.org wrote:
>>> Author: jonesde
>>> Date: Tue Apr 14 20:50:23 2009
>>> New Revision: 764947
>>> URL: http://svn.apache.org/viewvc?rev=764947&view=rev
>>> Log:
>>> Small change to have a prefix for all sequenced IDs by default
>>> Modified:
>>>    ofbiz/trunk/framework/entity/config/entityengine.xml
>>> Modified: ofbiz/trunk/framework/entity/config/entityengine.xml
>>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/config/entityengine.xml?rev=764947&r1=764946&r2=764947&view=diff
>>> = 
>>> = 
>>> = 
>>> = 
>>> = 
>>> = 
>>> = 
>>> = 
>>> = 
>>> =====================================================================
>>> --- ofbiz/trunk/framework/entity/config/entityengine.xml (original)
>>> +++ ofbiz/trunk/framework/entity/config/entityengine.xml Tue Apr 14  
>>> 20:50:23 2009
>>> @@ -49,21 +49,21 @@
>>>     <!-- the connection factory class to use, one is needed for  
>>> obtaining connections/pools for defined resources -->
>>>     <connection-factory  
>>> class="org.ofbiz.entity.connection.DBCPConnectionFactory"/>
>>> -    <delegator name="default" entity-model-reader="main" entity- 
>>> group-reader="main" entity-eca-reader="main" distributed-cache- 
>>> clear-enabled="false">
>>> +    <delegator name="default" sequenced-id-prefix="OFB" entity- 
>>> model-reader="main" entity-group-reader="main" entity-eca- 
>>> reader="main" distributed-cache-clear-enabled="false">
>>>         <group-map group-name="org.ofbiz" datasource- 
>>> name="localderby"/>
>>>         <group-map group-name="org.ofbiz.olap" datasource- 
>>> name="localderbyolap"/>
>>>     </delegator>
>>> -    <delegator name="default-no-eca" entity-model-reader="main"  
>>> entity-group-reader="main" entity-eca-reader="main" entity-eca- 
>>> enabled="false" distributed-cache-clear-enabled="false">
>>> +    <delegator name="default-no-eca" sequenced-id-prefix="OFB"  
>>> entity-model-reader="main" entity-group-reader="main" entity-eca- 
>>> reader="main" entity-eca-enabled="false" distributed-cache-clear- 
>>> enabled="false">
>>>         <group-map group-name="org.ofbiz" datasource- 
>>> name="localderby"/>
>>>         <group-map group-name="org.ofbiz.olap" datasource- 
>>> name="localderbyolap"/>
>>>     </delegator>
>>>      <!-- be sure that your default delegator (or the one you use)  
>>> uses the same datasource for test. You must run "ant run-install"  
>>> before running "ant run-tests" -->
>>> -    <delegator name="test" entity-model-reader="main" entity-group- 
>>> reader="main" entity-eca-reader="main">
>>> +    <delegator name="test" sequenced-id-prefix="OFB" entity-model- 
>>> reader="main" entity-group-reader="main" entity-eca-reader="main">
>>>         <group-map group-name="org.ofbiz" datasource- 
>>> name="localderby"/>
>>>         <group-map group-name="org.ofbiz.olap" datasource- 
>>> name="localderbyolap"/>
>>>     </delegator>
>>> -    <delegator name="other" entity-model-reader="main" entity- 
>>> group-reader="main" entity-eca-reader="main">
>>> +    <delegator name="other" sequenced-id-prefix="OFB" entity-model- 
>>> reader="main" entity-group-reader="main" entity-eca-reader="main">
>>>         <group-map group-name="org.ofbiz" datasource- 
>>> name="localpostgres"/>
>>>     </delegator>
>>>
>


Re: svn commit: r764947 - /ofbiz/trunk/framework/entity/config/entityengine.xml

Posted by David E Jones <da...@hotwaxmedia.com>.
This was indeed done to help with that, but I think I like it anyway.  
The overall effect is that it distinguishes the IDs from other  
sources, etc. On the other hand... maybe it's a little ugly?

-David


On Apr 14, 2009, at 5:42 PM, Adrian Crum wrote:

> If this was done to accommodate the UEL auto-vivify problem, it can  
> be reverted.
>
> -Adrian
>
> jonesde@apache.org wrote:
>> Author: jonesde
>> Date: Tue Apr 14 20:50:23 2009
>> New Revision: 764947
>> URL: http://svn.apache.org/viewvc?rev=764947&view=rev
>> Log:
>> Small change to have a prefix for all sequenced IDs by default
>> Modified:
>>    ofbiz/trunk/framework/entity/config/entityengine.xml
>> Modified: ofbiz/trunk/framework/entity/config/entityengine.xml
>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/config/entityengine.xml?rev=764947&r1=764946&r2=764947&view=diff
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> = 
>> =====================================================================
>> --- ofbiz/trunk/framework/entity/config/entityengine.xml (original)
>> +++ ofbiz/trunk/framework/entity/config/entityengine.xml Tue Apr 14  
>> 20:50:23 2009
>> @@ -49,21 +49,21 @@
>>     <!-- the connection factory class to use, one is needed for  
>> obtaining connections/pools for defined resources -->
>>     <connection-factory  
>> class="org.ofbiz.entity.connection.DBCPConnectionFactory"/>
>> -    <delegator name="default" entity-model-reader="main" entity- 
>> group-reader="main" entity-eca-reader="main" distributed-cache- 
>> clear-enabled="false">
>> +    <delegator name="default" sequenced-id-prefix="OFB" entity- 
>> model-reader="main" entity-group-reader="main" entity-eca- 
>> reader="main" distributed-cache-clear-enabled="false">
>>         <group-map group-name="org.ofbiz" datasource- 
>> name="localderby"/>
>>         <group-map group-name="org.ofbiz.olap" datasource- 
>> name="localderbyolap"/>
>>     </delegator>
>> -    <delegator name="default-no-eca" entity-model-reader="main"  
>> entity-group-reader="main" entity-eca-reader="main" entity-eca- 
>> enabled="false" distributed-cache-clear-enabled="false">
>> +    <delegator name="default-no-eca" sequenced-id-prefix="OFB"  
>> entity-model-reader="main" entity-group-reader="main" entity-eca- 
>> reader="main" entity-eca-enabled="false" distributed-cache-clear- 
>> enabled="false">
>>         <group-map group-name="org.ofbiz" datasource- 
>> name="localderby"/>
>>         <group-map group-name="org.ofbiz.olap" datasource- 
>> name="localderbyolap"/>
>>     </delegator>
>>      <!-- be sure that your default delegator (or the one you use)  
>> uses the same datasource for test. You must run "ant run-install"  
>> before running "ant run-tests" -->
>> -    <delegator name="test" entity-model-reader="main" entity-group- 
>> reader="main" entity-eca-reader="main">
>> +    <delegator name="test" sequenced-id-prefix="OFB" entity-model- 
>> reader="main" entity-group-reader="main" entity-eca-reader="main">
>>         <group-map group-name="org.ofbiz" datasource- 
>> name="localderby"/>
>>         <group-map group-name="org.ofbiz.olap" datasource- 
>> name="localderbyolap"/>
>>     </delegator>
>> -    <delegator name="other" entity-model-reader="main" entity- 
>> group-reader="main" entity-eca-reader="main">
>> +    <delegator name="other" sequenced-id-prefix="OFB" entity-model- 
>> reader="main" entity-group-reader="main" entity-eca-reader="main">
>>         <group-map group-name="org.ofbiz" datasource- 
>> name="localpostgres"/>
>>     </delegator>
>>