Re: [Modeling-users] XML model suggestion
Status: Abandoned
Brought to you by:
sbigaret
From: Sebastien B. <sbi...@us...> - 2003-02-20 20:57:19
|
Hi, Mario Ruggier <ma...@ru...> writes: > familiarizing myself with the framework, I suggest the following > modification to the XML to describe a model: >=20 > Instead of the XML elements: >=20 > <primaryKey ... > <attributesUsedForLocking ... >=20 > use XML attributes on the <attribute> XML element, i.e. >=20 > <attribute ... primaryKey=3D"1" ... > <attribute ... usedForLocking=3D"1" ... >=20 > This seems clearer, is less verbose,=20 Well, the reason why it is like this entirely comes from Entity's API: these two elements really point out an entity's (not an attribute's) characteristics. For attributesUsedForLocking: yes, I guess this could become an attribute of the <attribute> tag (this tag is not used yet but will identify the columns to be checked when optimistic-locking is implemented). But to me this looks more like an entity's property than an attribute's one. As far as the primaryKey is concerned, my opinion is much more mitigated. The primary key is a very important element in Entity-Relationship Modelling: not only because it uniquely identifies the row/object, but mainly because without it, no relationship/join can be defined --you may argue that foreign keys are not identified that way, true. Moreover and again, this designates a property of an entity, not an attribute's one. > and in any case keeps open your options to support changing your mind > about enforcing only one such attribute for each case -- should the > framework evolve that way. In that case, more than one <primaryKey> would be present in an Entity. I understand these are not strong reasons not to make the change, and that every of them can be argued: in this case, for example, why aint 'isClassProperty' or 'isRequired' element of entity?! However I feel somehow reluctant in removing these tags from the entity. Maybe I'm too used to it, or maybe it partly comes from the fact that I already feel a bit touchy about the xml-file, which should be more human-readable than it actually is. I'll think about your suggestions, though. And feel free to share if you have more arguments for it, and to insist about that :) -- S=E9bastien. |