Composite Model ID - Best Practices #289
Unanswered
mashaalmemon
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I wanted to know what the best practices is for composite ids. In my app we use a combination of two fields in order to uniquely identify an entity. Here I have a toy
User
model. I've made it such thatonInit()
a string representing the composite id is set withinthis.$modelId
. Is this an appropriate approach?:Is this a reasonable approach? Is the
onInit()
method the right place to do this?Beta Was this translation helpful? Give feedback.
All reactions