New answers tagged


Give each persistent object an unique id value (an unsigned int should suffice unless the number of objects can go into billions). Use that value as the primary key* of your database table. This ensures that the database will never have two entries for the same object. I would recommend you to not use auto increment for the id and instead assign that value ...

Top 50 recent answers are included