You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You shouldn't define primary keys yourself. Just let your database define it.
Also, most database engines are optimized for integer primary keys. You shouldn't use strings.
If what you're looking to do is add slugs to models, take a look at friendly_id.
when I am creating an user, like
It is initializing the object with id = 0(because
id
was set to'test'
), but actual id stored in DB is '1'.So is this correct or a bug? Shouldn't the
id
belast generated id, i.e. 1
The text was updated successfully, but these errors were encountered: