1 Reply Latest reply on Apr 28, 2014 3:28 PM by Akaine Harga

    How to create primary key in JPA for this  format MMDDYYXXX

    Gulam Samdani Expert

      I want to identify parts we buy at our plant. i require to give every a unique serial number that is based on the date.

      We can have multiple parts on a given date so i require to have the unique serial number in the format:

       

      MMDDYYXXX  where XXX is a unique number that start with 001 for the 1st item of the day. 002 for the second etc. but starting over the next day.