ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Skip" <s...@thedevers.org>
Subject RE: Problem with description field
Date Wed, 10 May 2017 18:04:14 GMT
Thanks for the reply Paul.  Datatype is Varying 255.  Also, this field name (description) is
used in dozens (hundreds?) of other entities like OrderAdjustment, OrderType, OrderTerm, Quote,
Requirement, ReturnItem, etc, etc.  I don't have problems with any other entity, only this
single one and the system has been in use for years (almost a decade now).

This is a production database, so Derby is out of the question.

Thanks in advance for thinking about it.

Skip

-----Original Message-----
From: Paul Foxworthy [mailto:paul@cohsoft.com.au]
Sent: Tuesday, May 09, 2017 6:58 PM
To: user@ofbiz.apache.org
Subject: Re: Problem with description field


Hi Skip,

Try it with Derby instead of Postgres. Postgres handles large text
differently from other databases, arguably better. Maybe OFBiz isn't doing
the right thing for Postgres. What's the Postgres data type for the
description columns?

Cheers

Paul Foxworthy


On 10 May 2017 at 10:33, Skip <skip@thedevers.org> wrote:

> I have a problem with a field named "description".  The problem is that
> when
> I write to this field, it never ends up in the database.
>
> The entity definition looks like this:
>
>    <entity entity-name="VendingMachinePack"
> ...
>         field name="description" type="description"
>         field name="descAgain" type="description"
> ...
>
> I write to the field like this:
>
> Map input = UtilMisc.toMap(...);
> input.put("description", description);
> input.put("descAgain", description);
>
> ...
> GenericValue newPack = delegator.makeValue("VendingMachinePack", input);
> System.out.println("Have Pack = " + newPack);
> //newPack.create();
> toStore.add(newPack);
>
> System.out.println("Have description " + newPack.getString("
> description"));
>
> ....
>
> delegator.storeAll(toStore);
>
> My log file shows the correct description from the System.out.println("Have
> description " statement.
>
> However, looking at the table using WebTools, the description field is
> EMPTY!!!
>
> I added a second description field called "descAgain" and this shows up
> fine
> as well as all the other 20 fields in the table.  Just the description
> field
> is empty.
>
> There are dozens of uses of "description" as a field name.
>
> Looking at the table with pgAdmin (I am using postgres), I find the field
> DESCRITPTION as expected, but it is empty.
>
> I have tried deleting the table with pgAdmin and having it automatically
> recreated.  As can be seen above, I have tried calling newPack.create();
> instead of delegator.storeAll(toStore); as well as a bunch of other stuff.
>
> Nothing I have tried has any effect on "description" this field.
>
> My log file has no errors.
>
> Anyone have any ideas on what might be going on?
>
> Skip
>
>


-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: info@coherentsoftware.com.au


Mime
View raw message