You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2007/09/09 11:16:50 UTC
svn commit: r573967 -
/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelFieldType.java
Author: jleroux
Date: Sun Sep 9 02:16:50 2007
New Revision: 573967
URL: http://svn.apache.org/viewvc?rev=573967&view=rev
Log:
A patch from Adrian Crum "ModelFieldType.StringLength() returns incorrect value" (https://issues.apache.org/jira/browse/OFBIZ-1229)
Modified:
ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelFieldType.java
Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelFieldType.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelFieldType.java?rev=573967&r1=573966&r2=573967&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelFieldType.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelFieldType.java Sun Sep 9 02:16:50 2007
@@ -52,7 +52,7 @@
public ModelFieldType(Element fieldTypeElement) {
this.type = UtilXml.checkEmpty(fieldTypeElement.getAttribute("type"));
this.javaType = UtilXml.checkEmpty(fieldTypeElement.getAttribute("java-type"));
- this.sqlType = UtilXml.checkEmpty(fieldTypeElement.getAttribute("sql-type"));
+ this.sqlType = UtilXml.checkEmpty(fieldTypeElement.getAttribute("sql-type")).toUpperCase();
this.sqlTypeAlias = UtilXml.checkEmpty(fieldTypeElement.getAttribute("sql-type-alias"));
NodeList validateList = fieldTypeElement.getElementsByTagName("validate");
Re: svn commit: r573967 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelFieldType.java
Posted by David E Jones <jo...@hotwaxmedia.com>.
Wow, okay, and you did it yourself! I haven't tested or anything, but yeah this approach looks better.
-David
Jacques Le Roux wrote:
> David,
>
> Yes you are right, I will do it right now.
>
> Jacques
>
> De : "David E Jones" <jo...@undersunconsulting.com>
>> Wouldn't it be better to just upper case for the comparison, and not in the variable setup which might have an effect on other
> things?
>> -David
>>
>>
>> jleroux@apache.org wrote:
>>> Author: jleroux
>>> Date: Sun Sep 9 02:16:50 2007
>>> New Revision: 573967
>>>
>>> URL: http://svn.apache.org/viewvc?rev=573967&view=rev
>>> Log:
>>> A patch from Adrian Crum "ModelFieldType.StringLength() returns incorrect value"
> (https://issues.apache.org/jira/browse/OFBIZ-1229)
>>> Modified:
>>> ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelFieldType.java
>>>
>>> Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelFieldType.java
>>> URL:
> http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelFieldType.java?rev=573967&r1=573966&r2=573967&view=diff
>>> ==============================================================================
>>> --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelFieldType.java (original)
>>> +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelFieldType.java Sun Sep 9 02:16:50 2007
>>> @@ -52,7 +52,7 @@
>>> public ModelFieldType(Element fieldTypeElement) {
>>> this.type = UtilXml.checkEmpty(fieldTypeElement.getAttribute("type"));
>>> this.javaType = UtilXml.checkEmpty(fieldTypeElement.getAttribute("java-type"));
>>> - this.sqlType = UtilXml.checkEmpty(fieldTypeElement.getAttribute("sql-type"));
>>> + this.sqlType = UtilXml.checkEmpty(fieldTypeElement.getAttribute("sql-type")).toUpperCase();
>>> this.sqlTypeAlias = UtilXml.checkEmpty(fieldTypeElement.getAttribute("sql-type-alias"));
>>>
>>> NodeList validateList = fieldTypeElement.getElementsByTagName("validate");
>>>
>>>
>
Re: svn commit: r573967 -
/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelFieldType.java
Posted by Jacques Le Roux <ja...@les7arts.com>.
David,
Yes you are right, I will do it right now.
Jacques
De : "David E Jones" <jo...@undersunconsulting.com>
>
> Wouldn't it be better to just upper case for the comparison, and not in the variable setup which might have an effect on other
things?
>
> -David
>
>
> jleroux@apache.org wrote:
> > Author: jleroux
> > Date: Sun Sep 9 02:16:50 2007
> > New Revision: 573967
> >
> > URL: http://svn.apache.org/viewvc?rev=573967&view=rev
> > Log:
> > A patch from Adrian Crum "ModelFieldType.StringLength() returns incorrect value"
(https://issues.apache.org/jira/browse/OFBIZ-1229)
> >
> > Modified:
> > ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelFieldType.java
> >
> > Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelFieldType.java
> > URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelFieldType.java?rev=573967&r1=573966&r2=573967&view=diff
> > ==============================================================================
> > --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelFieldType.java (original)
> > +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelFieldType.java Sun Sep 9 02:16:50 2007
> > @@ -52,7 +52,7 @@
> > public ModelFieldType(Element fieldTypeElement) {
> > this.type = UtilXml.checkEmpty(fieldTypeElement.getAttribute("type"));
> > this.javaType = UtilXml.checkEmpty(fieldTypeElement.getAttribute("java-type"));
> > - this.sqlType = UtilXml.checkEmpty(fieldTypeElement.getAttribute("sql-type"));
> > + this.sqlType = UtilXml.checkEmpty(fieldTypeElement.getAttribute("sql-type")).toUpperCase();
> > this.sqlTypeAlias = UtilXml.checkEmpty(fieldTypeElement.getAttribute("sql-type-alias"));
> >
> > NodeList validateList = fieldTypeElement.getElementsByTagName("validate");
> >
> >
Re: svn commit: r573967 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelFieldType.java
Posted by David E Jones <jo...@undersunconsulting.com>.
Wouldn't it be better to just upper case for the comparison, and not in the variable setup which might have an effect on other things?
-David
jleroux@apache.org wrote:
> Author: jleroux
> Date: Sun Sep 9 02:16:50 2007
> New Revision: 573967
>
> URL: http://svn.apache.org/viewvc?rev=573967&view=rev
> Log:
> A patch from Adrian Crum "ModelFieldType.StringLength() returns incorrect value" (https://issues.apache.org/jira/browse/OFBIZ-1229)
>
> Modified:
> ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelFieldType.java
>
> Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelFieldType.java
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelFieldType.java?rev=573967&r1=573966&r2=573967&view=diff
> ==============================================================================
> --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelFieldType.java (original)
> +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelFieldType.java Sun Sep 9 02:16:50 2007
> @@ -52,7 +52,7 @@
> public ModelFieldType(Element fieldTypeElement) {
> this.type = UtilXml.checkEmpty(fieldTypeElement.getAttribute("type"));
> this.javaType = UtilXml.checkEmpty(fieldTypeElement.getAttribute("java-type"));
> - this.sqlType = UtilXml.checkEmpty(fieldTypeElement.getAttribute("sql-type"));
> + this.sqlType = UtilXml.checkEmpty(fieldTypeElement.getAttribute("sql-type")).toUpperCase();
> this.sqlTypeAlias = UtilXml.checkEmpty(fieldTypeElement.getAttribute("sql-type-alias"));
>
> NodeList validateList = fieldTypeElement.getElementsByTagName("validate");
>
>
Re: svn commit: r573967 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelFieldType.java
Posted by David E Jones <jo...@undersunconsulting.com>.
Wouldn't it be better to just upper case for the comparison, and not in the variable setup which might have an effect on other things?
-David
jleroux@apache.org wrote:
> Author: jleroux
> Date: Sun Sep 9 02:16:50 2007
> New Revision: 573967
>
> URL: http://svn.apache.org/viewvc?rev=573967&view=rev
> Log:
> A patch from Adrian Crum "ModelFieldType.StringLength() returns incorrect value" (https://issues.apache.org/jira/browse/OFBIZ-1229)
>
> Modified:
> ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelFieldType.java
>
> Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelFieldType.java
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelFieldType.java?rev=573967&r1=573966&r2=573967&view=diff
> ==============================================================================
> --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelFieldType.java (original)
> +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelFieldType.java Sun Sep 9 02:16:50 2007
> @@ -52,7 +52,7 @@
> public ModelFieldType(Element fieldTypeElement) {
> this.type = UtilXml.checkEmpty(fieldTypeElement.getAttribute("type"));
> this.javaType = UtilXml.checkEmpty(fieldTypeElement.getAttribute("java-type"));
> - this.sqlType = UtilXml.checkEmpty(fieldTypeElement.getAttribute("sql-type"));
> + this.sqlType = UtilXml.checkEmpty(fieldTypeElement.getAttribute("sql-type")).toUpperCase();
> this.sqlTypeAlias = UtilXml.checkEmpty(fieldTypeElement.getAttribute("sql-type-alias"));
>
> NodeList validateList = fieldTypeElement.getElementsByTagName("validate");
>
>