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
When using ValueStringType which extends AnyGenericValueType containing a serie of different string-type value, dealing with the uncertainty of which attribute may be used can be very confusing and exhausting. At the same time, unnecessary storage zone is required for saving the sparse object into database. All these inconvenience may be avoided by introducing more storage-economic and esay-use design:
Redesign ValueStringType like
{
valueString: string,
valueStringTypeType: ValueStringTypeType,
}
where ValueStringTypeType like
{
valueStringType: ValueStringTypeEnum,
otherValue: string,
}
and ValueStringTypeEnum exactly refer to the attribute names in current AnyGenericValueType.
In such a way, single-value cases shall be dealed with quite well.
And in case of some more complicated cases, where multiple attributes are filled at the same time, something like grouping mechanism such as ValueStringSet or nested ValueString need to be introduced. But there is already a list for containing different values, will this supposition be really necessary?
The text was updated successfully, but these errors were encountered:
When using ValueStringType which extends AnyGenericValueType containing a serie of different string-type value, dealing with the uncertainty of which attribute may be used can be very confusing and exhausting. At the same time, unnecessary storage zone is required for saving the sparse object into database. All these inconvenience may be avoided by introducing more storage-economic and esay-use design:
Redesign ValueStringType like
{
valueString: string,
valueStringTypeType: ValueStringTypeType,
}
where ValueStringTypeType like
{
valueStringType: ValueStringTypeEnum,
otherValue: string,
}
and ValueStringTypeEnum exactly refer to the attribute names in current AnyGenericValueType.
In such a way, single-value cases shall be dealed with quite well.
And in case of some more complicated cases, where multiple attributes are filled at the same time, something like grouping mechanism such as ValueStringSet or nested ValueString need to be introduced. But there is already a list for containing different values, will this supposition be really necessary?
The text was updated successfully, but these errors were encountered: