Get the latest record ID - smartest solution

Posted 7 months ago by christopher

I've an ongoing invoice number and i'm currently thinking what could be the smartest way to create the new database entry with the ongoing number.

Do you think i should get the latest record of the database before i save the new model and then add +1 to the newly created record?

Do you think this is the best way to archive this?

Please sign in or create an account to participate in this conversation.