Best way to define handle
values
#1350
Unanswered
netzknecht
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 noticed that lunar uses user-defined and subsequently changeable
handle
values in various places, some of which are also created from translatable strings.In my opinion, this is not particularly problematic as long as they are not used to reference relations between data records. However, this is the case with the
Attribute
models in conjunction with theattribute_data
collections. Careless changes to thehandle
values can then lead to inconsistent references.So, it would be better to use automatically generated and unchangeable IDs for the assignment between
Attribute
model and the referenced data in anattribute_data
collection or perhaps, use a dedicated database relation to store attribute data, even if it involves additional database queries.Because a user defined
handle
is more comfortable for human to handle :-), it should be also available but with the recommendation to define uniformly in English.Beta Was this translation helpful? Give feedback.
All reactions