How is unique orderNumber generated
Posted: Mon Feb 25, 2013 12:08 pm
Hello,
I have plans to extend DiscreteOrderItem to have my custom ECertOrderItem. The intention is to generate unique eCertNumber (just like orderNumber) each time a certificate (my sku) is added to the cart or when checkout is performed. For this I have added an attribute to ECertOrderItem called eCertNumber.
My question are:
1) When and how is orderNumber generated
2) Should I use hibernate to generate uniqueID for ECertOrderItem as primary key and then have some algorithm (just like orderNumber) to get eCertNumber and expose it to customers.
As I am implementing this requirement for the first time, wanted to know if this approach is okay? I would appreciate if someone can help me on the ways unique IDs, that can be shared with users, are generated.
Thanks
Skala
I have plans to extend DiscreteOrderItem to have my custom ECertOrderItem. The intention is to generate unique eCertNumber (just like orderNumber) each time a certificate (my sku) is added to the cart or when checkout is performed. For this I have added an attribute to ECertOrderItem called eCertNumber.
My question are:
1) When and how is orderNumber generated
2) Should I use hibernate to generate uniqueID for ECertOrderItem as primary key and then have some algorithm (just like orderNumber) to get eCertNumber and expose it to customers.
As I am implementing this requirement for the first time, wanted to know if this approach is okay? I would appreciate if someone can help me on the ways unique IDs, that can be shared with users, are generated.
Thanks
Skala