...
- The prototype name is "shortString".
- The external type (iei.e., the database type) is varchar.
- The varchar width is 50, which means you can save up to 50 characters on each record.
- The Java class that will map the database value in memory is String.
...
As state before, one of the advantages of using prototypes is that, if you change a prototype definition, your model will automatically use the new definition for all the attributes that are linked to that prototype. There's also an interesting feature here that is worst worth mentioning. After setting a prototype in a given attribute of your model, you can decide to change some details of the prototype. So, imagine you have a shortString
prototype like the one showed above, but you decide that on some specific attribute that links to that prototype that you want the size to me 25 and not 50. You could not use the prototype at all for that attribute, and, instead, defining everything manually. But there's a better way: just set the prototype for smallString, and then, change the size from 50 to 25. When you try that, you'll see the 25 value will show up in black, not brown.
...