This issue is likely caused by inserting records directly into the database.
Mendix maintains an internal numbering system for all records in the database via your app. If you insert records directly into the database, that numbering system is probably not maintained for those records. Because of that, Mendix is unable to manipulate those records.
Inserting records directly into the database is not recommended. Is there a reason you are doing this? Perhaps the community could suggest an alternate method of adding records to the database that meets your needs and uses the Mendix platform as it was intended to be used.