When modeling a domain, is it possible to indicate that a field is fixed length? For example, if I have a field that stores SHA1 hashes, each hash will always be exactly 20 bytes. The following property could be used to store these hashes:
... but the database column generated is of type There are other examples where fixed length columns are appropriate, for example a |
Hello mpetito, Unfortunately, DataObjects.Net 4 doesn't support fixed length datatypes. Is this feature planned for a future version? If not, is there a workaround? Perhaps an Could you explain, what are the benefits of fixed length datatypes and why variable length datatypes can't be used in those scenarios effectively? It is really important for the possibility of the feature. Thanks. I think there are two main advantages. (1) Data Integrity: My specification is that each value is exactly 20 bytes. It does not make sense to put a value in of any other length. (2) Performance: Fixed length non-nullable columns require less storage space, and for records composed entirely of these columns, indexing within pages of records is optimized. I've added the request to the feature poll. Depending on the popularity, we'll implement the request sooner or later. |