Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

grails: randomized auto id's

In a default install of rails when you save the first domain object it gives a fancy randomized id like 785787634 or something. Grails gives 1.

What is the preferred method of making difficult-to-guess and unlikely-to-intersect auto generated ids in grails?

like image 631
Mikey Avatar asked Jan 18 '23 11:01

Mikey


1 Answers

Grails allows you to customize the id generator. see http://grails.org/doc/latest/guide/GORM.html#identity

In your case, you could consider 'uuid' or 'guid'

like image 132
aldrin Avatar answered Feb 01 '23 03:02

aldrin