update not allowed for field 'TableX.Field1'
The entity contains TableX as a primary datasource (not read only) and it's outer joined with Table1 (which is a read only)
the entity key is another field: Field2 (not Field1)
Field1 in the entity is private
Also the unique index for this table contains more than one field, and this Field1 is one of them.
There is this code in the entity:
public boolean insertEntityDataSource(DataEntityRuntimeContext _entityCtx, DataEntityDataSourceRuntimeContext _dataSourceCtx)
{
boolean ret;
if (_dataSourceCtx.name() == tableStr(TableX))
{
Table1 table1;
select firstonly Field1, FieldA, FieldB from table1 where Table1.FieldC == this.FieldZ;
TableX tableX = _dataSourceCtx.getBuffer();
tableX.Field1 = table1.Field1;
tableX.FieldA = table1.FieldA;
tableX.FieldB = table1.FieldB;
_dataSourceCtx.setBuffer(tableX);
}
ret = super(_entityCtx, _dataSourceCtx);
return ret;
}