autonumber will increase every time you create an object from this entity so you should make unpersistable entity with the same attibutes to pass the information and only create an object from the main entity on commit
Make sure you referred to best practice before using it in application
https://docs.mendix.com/refguide/performance-best-practices