db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Jefferson <a...@jpox.org>
Subject Re: Issue 139: Add field-type attribute to field element
Date Sat, 12 Nov 2005 06:52:52 GMT
Hi Craig,

>Proposal:
<!ATTLIST field field-type CDATA #IMPLIED>

I'm in total agreement on the need for a MetaData attribute for this, and for
arrays, and collections, and maps. 
My only issue is with the name(s) chosen.

You have "element-type" being added for arrays of Object/interface.
You have "field-type" for Object/interface fields.
You also need something for Collection elements, and something for Map
keys/values (Is this a separate Issue number ?)

Using "element-type" for array gives issues when deciding what to call the
attribute for collections (since we already have "element-type" on Collection).
The user has defined a collection as containing elements of type
java.lang.Object, and needs to specify the implementation types for these
elements to give the implementation a clue as to what it should expect.


I would propose something more like the following

<!ATTLIST field implementation-type CDATA #IMPLIED>
<!ATTLIST array element-implementation-type CDATA #IMPLIED>
<!ATTLIST collection element-implementation-type CDATA #IMPLIED>
<!ATTLIST map key-implementation-type CDATA #IMPLIED>
<!ATTLIST map value-implementation-type CDATA #IMPLIED>

since the name is directed to what it is describing - the "implementation
classes" that can be stored in this interface/Object field.



--
Andy

Mime
View raw message