Contact CA Support‎ > ‎Errors‎ > ‎

error50056

This error indicates that a count has tried to become less than zero. This is of course logically impossible. This situation can happen in a few cases.

1 - The count column is out of date

If, for instance, you have added child rows using SQL, or somehow bypassing Live API Creator, the count will no longer reflect the actual number of children in the database. If you then update or delete children, you might get to a point where the count is decremented below zero, at which point this error will occur.

To correct this situation, you need to update your database so that the count column reflects the child rows actually present in the database.

2 - The count qualification is time-dependent

If the qualification for the count can change value depending on when it is evaluated, it is possible to get into situations where a count might become incorrect. This type of qualification is not supported, nor is it likely to ever be supported, since it creates logical contradictions.

To correct this situation, you'll need to rethink your model. A common solution consists of having a parent object per day, for instance, and to use the "insert-parent-if-none" pattern.

Comments