Error when saving a column which is first in p_info

Description

The method PO.set_CustomColumnReturningBoolean(String columnName, Object value) looks first for the index of columnName. It is called via PO.set_CustomColumn() by several other methods.

There, it sets the value of the column with set_Value(columnName, value) if the column is defined in the Application Dictionary. Otherwise it is handled as a String

The error is the following line:
if (poIndex == 0)
This means, that if a column is defined in the Application Dictionary, but by chance is the first column of p_info, the value is tried to be set as a String. If the column is a reference to another object, null will be stored. If the column is a primary key or part of a composed key, the object will yield a "SaveError" when loading.

The fix: changing the line to
if (poIndex == 0)

This is a serious error and it is a wonder it has not been raised before.

Environment

None

Assignee

Mario Calderon

Reporter

Mario Calderon

Labels

None

Components

Affects versions

Due date

2015/07/20

Priority

Critical
Configure