Over the past few years, I have seen a specific sample several times. Please let me describe this.
In the user interface, each new record (for example, new customer data) is saved in the form without being saved in the database. This is clearly done so as not to clutter up the database or create unnecessary database hits.
In the user interface state, these objects are identified using Guid. When they are saved in the database, the associated Guides are not saved. Instead, they are assigned the Int database as the primary key.
A form can handle mixing up the extracted elements from the database (using Int), as well as those that have not yet been completed (using Guid).
When checking the form (using Firebug) to find out which key was used, we found that a combined key with two-part separators was used. The first part is guid (an empty manual if it is removed from the database), and the second part is an integer (zero is preserved if it is not extracted from the database). Since one part of the combined key will always uniquely identify the record, it works pretty well.
Is this a good practice or not? Can someone tell me the name of the template or suggest it if it is not already named?
source
share