teammates icon indicating copy to clipboard operation
teammates copied to clipboard

Use @GenerateValue to automatically generate Id of Entities instead of UUID.randomUUID()

Open kevin9foong opened this issue 1 year ago • 4 comments

Environment: v9-migration

Description of feature/enhancement Use @GeneratedValue for entities instead of using UUID.randomUUID() for sql entities.

For example, image we should add a @GeneratedValue for the @Id field.

Justification

While there is a low chance of collision using UUID.randomUUID(), there is still a small chance of failure if the random UUID generated in teammates/src/main/java/teammates/sqllogic/core/DataBundleLogic.java persistDataBundle method. image

Instead, a better practice might be to use @GeneratedValue annotation to generate a safe UUID for the respective entities such as Section, Student etc.

This would prevent a collision bug from ever occurring.

kevin9foong avatar Jan 27 '24 05:01 kevin9foong

is these issue still persist , can i work on it ?

ArunErram avatar Jan 27 '24 06:01 ArunErram

hi @ArunErram, this issue deals with our v9-migration, which is for committers only to contribute to

cedricongjh avatar Jan 27 '24 16:01 cedricongjh

is these issue still persist , can i work on it ?

hi @ArunErram, we will try to release some new issues regularly, please have a look of some of the other open issues posted!

kevin9foong avatar Jan 30 '24 05:01 kevin9foong

Hello @cedricongjh, can I work on this issue?

quantavoid11 avatar Feb 02 '24 13:02 quantavoid11