mardi 26 avril 2016

Inserting data to DB using system-uuid

I have run into a problem related to System generated uniquer identifier.

Below is the definition of a datamember from my bean class:

@Id
@GeneratedValue(generator = "system-uuid")
@GenericGenerator(name = "system-uuid", strategy = "uuid")
@Column(name = "id")
private String id;

Whenever the client action is invoked, data will be persisted to DB based with the value for id attribute generated dynamically using above system-uuid. Now I have a requirement wherein i have to perform mass insert to this table. As there is no import functionality, is there any way that i can perform the bulk insert from backend using oracle insert queries? If so, how do i mention the value for the column 'id' so that it works like the same as the insert happened from client.




Aucun commentaire:

Enregistrer un commentaire