Invoking APIs‎ > ‎Error Codes‎ > ‎

error50056

The error50056 error indicates that a count has tried to become less than zero. This is logically impossible. This situation can happen in the following cases:

  • 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, update your database so that the count column reflects the child rows actually present in the database.

  • 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, 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.