Error when inserting PO with a LOB mandatory field

Description

When you create a table and a column with a reference to LOB (such as Text Long), and set this column as mandatory. iDempiere does not let any record in that table to be saved.

When the records is saved the following error is thrown:
Database Error.: DBExecuteError:ERROR: null value in column "NNN" violates not-null constraint

After reviewing the code, I've noticed that PO.doInsert ignores the values (or set them to null) when the DisplayType is LOB, which causes that when the field is set to mandatory no new records can be created.

Environment

None

Attachments

1

Activity

Show:

Diego Ruiz March 20, 2018 at 7:33 PM

,

Attached you can find a patch that solves the issue.

Kind Regards,
Diego Ruiz

Fixed

Details

Assignee

Reporter

Priority

Created March 20, 2018 at 7:31 PM
Updated May 1, 2018 at 1:46 PM
Resolved March 20, 2018 at 9:18 PM