in the ListContent section of ContentForms.xml, why the length of
contentName is more than 20 will cause SQLSTATE: 22001 error in DB2? <field name="contentName" widget-style="tabletext"> <display-entity entity-name="Content" description="${contentName}" key-field-name="contentId"> <sub-hyperlink target="editContent?contentId=${contentId}" description="[${contentId}]" link-style="buttontext"/> </display-entity> </field> |
I guess the problem is not the contentName, but the contenId.
As far as I know, the primary key lenght of the BD2 is limited (I don't know the value), but maybe you can try it with some simple contentId's? Viele Grüße Best Regards "guo weizhan" <[hidden email]> 21.02.2008 10:16 Please respond to [hidden email] To [hidden email] cc Subject how the display-entity work? in the ListContent section of ContentForms.xml, why the length of contentName is more than 20 will cause SQLSTATE: 22001 error in DB2? <field name="contentName" widget-style="tabletext"> <display-entity entity-name="Content" description="${contentName}" key-field-name="contentId"> <sub-hyperlink target="editContent?contentId=${contentId}" description="[${contentId}]" link-style="buttontext"/> </display-entity> </field> Dimitri Unruh Consultant AEW Agrenon GmbH Johanniskirchplatz 6 33615 Bielefeld Deutschland Fon: +49 521 5247-0 Fax: +49 521 5247-250 Mobil: +49 160 90 57 55 13 Company and Management Headquarters: Agrenon GmbH, Johanniskirchplatz 6, 33615 Bielefeld, Deutschland, Fon: +49 521 5247-0, Fax: +49 521 5247-250, www.agrenon.com Court Registration: Amtsgericht Bielefeld HRB 36795 Chief Executive Officer: Dirk Osterkamp ---------------------------------------------------------------------------------------------------- This e-mail may contain trade secrets or privileged, undisclosed, or otherwise confidential information. If you have received this e-mail in error, you are hereby notified that any review, copying, or distribution of it is strictly prohibited. Please inform us immediately and destroy the original transmittal. Thank you for your cooperation. ---------------------------------------------------------------------------------------------------- * |
I test the content id with CDI1201 , it's fine
the error occur only when the length of contentname more than 20 2008/2/21, Dimitri Unruh <[hidden email]>: > > I guess the problem is not the contentName, but the contenId. > As far as I know, the primary key lenght of the BD2 is limited (I don't > know the value), > but maybe you can try it with some simple contentId's? > > > Viele Grüße > Best Regards > > > > "guo weizhan" <[hidden email]> > 21.02.2008 10:16 > Please respond to > [hidden email] > > > To > [hidden email] > cc > > Subject > how the display-entity work? > > > > > > > > in the ListContent section of ContentForms.xml, why the length of > contentName is more than 20 will cause SQLSTATE: 22001 error in DB2? > <field name="contentName" widget-style="tabletext"> > <display-entity entity-name="Content" > description="${contentName}" key-field-name="contentId"> > <sub-hyperlink target="editContent?contentId=${contentId}" > description="[${contentId}]" link-style="buttontext"/> > </display-entity> > </field> > > > > > > Dimitri Unruh > Consultant AEW > Agrenon GmbH > Johanniskirchplatz 6 > 33615 Bielefeld > Deutschland > Fon: +49 521 5247-0 > Fax: +49 521 5247-250 > Mobil: +49 160 90 57 55 13 > > > Company and Management Headquarters: > Agrenon GmbH, Johanniskirchplatz 6, 33615 Bielefeld, Deutschland, Fon: +49 > 521 5247-0, Fax: +49 521 5247-250, www.agrenon.com > > Court Registration: Amtsgericht Bielefeld HRB 36795 > Chief Executive Officer: Dirk Osterkamp > > > ---------------------------------------------------------------------------------------------------- > This e-mail may contain trade secrets or privileged, undisclosed, or > otherwise confidential information. If you have received this e-mail in > error, you are hereby notified that any review, copying, or distribution of > it is strictly prohibited. Please inform us immediately and destroy the > original transmittal. Thank you for your cooperation. > > ---------------------------------------------------------------------------------------------------- > > * |
guo weizhan wrote:
>I test the content id with CDI1201 , it's fine > >the error occur only when the length of contentname more than 20 > > DB2 is not a perferred database for OFBiz... AFAICT Search the archives of this mailling list. I seem to remember some workarounds in the past year http://www.nabble.com/OFBiz---User-f2743.html |
Thanks, I have read the old post before, but I need ofbiz support the db2
database, and db2 is the important db in market, it can make ofbiz be adopted widely. 2008/2/21, Walter Vaughan <[hidden email]>: > > guo weizhan wrote: > > >I test the content id with CDI1201 , it's fine > > > >the error occur only when the length of contentname more than 20 > > > > > > DB2 is not a perferred database for OFBiz... AFAICT > Search the archives of this mailling list. I seem to remember some > workarounds in the past year > http://www.nabble.com/OFBiz---User-f2743.html > > > |
I think this is the bug, it should be change to this:
<field name="contentId" widget-style="tabletext"> <display-entity entity-name="Content" description="${contentName}" key-field-name="contentId"> <sub-hyperlink target="editContent?contentId=${contentId}" description="[${contentId}]" link-style="buttontext"/> </display-entity> </field> does it?? 2008/2/22, guo weizhan <[hidden email]>: > > Thanks, I have read the old post before, but I need ofbiz support the db2 > database, and db2 is the important db in market, it can make ofbiz be > adopted widely. > > 2008/2/21, Walter Vaughan <[hidden email]>: > > > > guo weizhan wrote: > > > > >I test the content id with CDI1201 , it's fine > > > > > >the error occur only when the length of contentname more than 20 > > > > > > > > > > DB2 is not a perferred database for OFBiz... AFAICT > > Search the archives of this mailling list. I seem to remember some > > workarounds in the past year > > http://www.nabble.com/OFBiz---User-f2743.html > > > > > > > |
where do you see a length defined here?
guo weizhan sent the following on 2/21/2008 6:41 PM: > I think this is the bug, it should be change to this: > > <field name="contentId" widget-style="tabletext"> > <display-entity entity-name="Content" > description="${contentName}" key-field-name="contentId"> > <sub-hyperlink target="editContent?contentId=${contentId}" > description="[${contentId}]" link-style="buttontext"/> > </display-entity> > </field> > > does it?? > > 2008/2/22, guo weizhan <[hidden email]>: >> Thanks, I have read the old post before, but I need ofbiz support the db2 >> database, and db2 is the important db in market, it can make ofbiz be >> adopted widely. >> >> 2008/2/21, Walter Vaughan <[hidden email]>: >>> guo weizhan wrote: >>> >>>> I test the content id with CDI1201 , it's fine >>>> >>>> the error occur only when the length of contentname more than 20 >>>> >>>> >>> DB2 is not a perferred database for OFBiz... AFAICT >>> Search the archives of this mailling list. I seem to remember some >>> workarounds in the past year >>> http://www.nabble.com/OFBiz---User-f2743.html >>> >>> >>> > |
I see the length defined in entitymodel of course.
I think the display-entity work like this: select *** from Content where key-field-name = value the value get from field name="contentId" does it ? if yes, why it can work when name="contentName" in other db, a little confused... 2008/2/22, BJ Freeman <[hidden email]>: > > where do you see a length defined here? > > guo weizhan sent the following on 2/21/2008 6:41 PM: > > > I think this is the bug, it should be change to this: > > > > <field name="contentId" widget-style="tabletext"> > > <display-entity entity-name="Content" > > description="${contentName}" key-field-name="contentId"> > > <sub-hyperlink > target="editContent?contentId=${contentId}" > > description="[${contentId}]" link-style="buttontext"/> > > </display-entity> > > </field> > > > > does it?? > > > > 2008/2/22, guo weizhan <[hidden email]>: > >> Thanks, I have read the old post before, but I need ofbiz support the > db2 > >> database, and db2 is the important db in market, it can make ofbiz be > >> adopted widely. > >> > >> 2008/2/21, Walter Vaughan <[hidden email]>: > >>> guo weizhan wrote: > >>> > >>>> I test the content id with CDI1201 , it's fine > >>>> > >>>> the error occur only when the length of contentname more than 20 > >>>> > >>>> > >>> DB2 is not a perferred database for OFBiz... AFAICT > >>> Search the archives of this mailling list. I seem to remember some > >>> workarounds in the past year > >>> http://www.nabble.com/OFBiz---User-f2743.html > >>> > >>> > >>> > > > > |
Actually ofbiz does not use the DB as a reference but uses the
entitymodel and fieldtypexxxxxxxx.xml file. Depending on whether a widget or FTL the rendering code define the length of field from the entity model, Field type. The absolute length is defined from the fieldtypexxxxxxxx.xml. where the xxxxx is the db you will notice the Entity model does not define an absolute length. The fieldtypexxxxxxxx.xml is were the absolute lenght is defined. There should never be a field length longer that the db ability if the fieldtypexxxxxxxx field length is defined properly. now there maybe a bug in the rendering code for UI's but I don't know where exactly that might be. guo weizhan sent the following on 2/22/2008 7:27 AM: > I see the length defined in entitymodel of course. > I think the display-entity work like this: select *** from Content > where key-field-name > = value > the value get from field name="contentId" does it ? if yes, why it can work > when name="contentName" in other db, a little confused... > > 2008/2/22, BJ Freeman <[hidden email]>: >> where do you see a length defined here? >> >> guo weizhan sent the following on 2/21/2008 6:41 PM: >> >>> I think this is the bug, it should be change to this: >>> >>> <field name="contentId" widget-style="tabletext"> >>> <display-entity entity-name="Content" >>> description="${contentName}" key-field-name="contentId"> >>> <sub-hyperlink >> target="editContent?contentId=${contentId}" >>> description="[${contentId}]" link-style="buttontext"/> >>> </display-entity> >>> </field> >>> >>> does it?? >>> >>> 2008/2/22, guo weizhan <[hidden email]>: >>>> Thanks, I have read the old post before, but I need ofbiz support the >> db2 >>>> database, and db2 is the important db in market, it can make ofbiz be >>>> adopted widely. >>>> >>>> 2008/2/21, Walter Vaughan <[hidden email]>: >>>>> guo weizhan wrote: >>>>> >>>>>> I test the content id with CDI1201 , it's fine >>>>>> >>>>>> the error occur only when the length of contentname more than 20 >>>>>> >>>>>> >>>>> DB2 is not a perferred database for OFBiz... AFAICT >>>>> Search the archives of this mailling list. I seem to remember some >>>>> workarounds in the past year >>>>> http://www.nabble.com/OFBiz---User-f2743.html >>>>> >>>>> >>>>> >> > |
Free forum by Nabble | Edit this page |