Custom "name" or Naming Series in Child Table

Hi,

As for the default, child table will have a “name” with 10 digits hash. And probably my child table will be populated with 9m rows per month. I did some calculations the probability of a duplicate name will be generated will be close to 1/7.

It seems I need the “10 digits hash” to be longer. Are you guys have any idea how to change that?

Screen Shot 2022-06-08 at 09.40.24

Hi @Muhammad_Sidargo,

Please check this.

Thanks.

Apparently, I did the calculation wrong, so it shouldn’t be an issue anymore. Thank you for the information mate, @NCP.

Agreed, there’s about 1.1 trillion possible combinations. At 9 million assignments per month, will take over 10,000 Years to run out of hashes.

Still, I wonder what happens if the ERP does create an identical hash, to what’s already in the Child Table. It’s improbable…but possible. Is it smart enough to recognize this, and just choose another number? :thinking:

So my earlier reply was very wrong.

The probability of ID collision is extremely likely, because of the Birthday Paradox.

I believe Frappe Framework already solved this in recent versions. But for anyone V13 or lower, you’ll have to alter code in frappe.model.naming