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:46:16 GMT
Arun

Thanks for the response.  I am using postgres 9.1 for development and 9.2 in
production.  Once again, none of the other entities that use a description
field have this problem.  Only this single one.  pgAdmin reports the
description field for ReturnItem as character varying(255).  It reports the
description field for VendingMachinePack (the one I am having problems with)
as character varying(255) as well.

Note that I can edit the VendingMachinePack record created with Webtools and
successfully change the description field and have it stick.  The bit of
java code that creates the record is in a service with no "use-transaction"
statement, so the service is wrapped in a transaction.   Also note that ALL
the other fields in the entity (19 total) get updated correctly.  It is only
this single "description" field that is a problem.  As I said earlier, I
added a "descAgain" field (that duplicates the description field type) and
filled it with the same contents as the description field and it gets saved
to the database correctly, eg:

> input.put("description", description);
> input.put("descAgain", description);

"descAgain" gets written correctly, but "description" ends up blank.  A
strange problem.

Skip



-----Original Message-----
From: Arun Sankar [mailto:arunsankar89@outlook.com]
Sent: Wednesday, May 10, 2017 6:11 AM
To: user@ofbiz.apache.org
Subject: Re: Problem with description field



Hi Skip,


Can you share the version of Postgres which you are using. I am using
Postgres in my current project and have not experienced such an issue.


We use <field name="description" type="description"></field> on multiple
entities in ofbiz such as Product, InvoiceItem, Facility etc in Ofbiz.


Also I would suggest to create an Invoice and check the Description field on
the Invoice item. This would help to further understand whether this really
is an issue with using the name description.


Regards,

Arun Sankar

________________________________
From: Paul Foxworthy <paul@cohsoft.com.au>
Sent: Wednesday, May 10, 2017 7:28:17 AM
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/
Coherent Software - Custom software,web application and
...<http://www.coherentsoftware.com.au/>
www.coherentsoftware.com.au
Coherent Software Australia Making your business more productive. Coherent
Software specialise in custom software for small and medium businesses.



Email: info@coherentsoftware.com.au


Mime
View raw message