user model - id vs pid #1619
Unanswered
kevinclancy
asked this question in
Q&A
Replies: 1 comment 1 reply
-
|
The app uses two identifiers for different purposes. The |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Loco's built-in user table has two fields called
idandpid.The
idfield is the primary key, whereas thepidfield is a Uuid. The default user model contains afind_by_pidmethod.I understand both of these fields to be unique identifiers for users. Why do we have two different identifier fields? Is the
find_by_pidmethod inefficient considering that no index for thepidfield is added in the default users migration?Beta Was this translation helpful? Give feedback.
All reactions