Hi Andy,

On Nov 11, 2005, at 10:52 PM, Andy Jefferson wrote:

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 ?)

We already have
<!ATTLIST collection element-type CDATA #IMPLIED>
<!ATTLIST map key-type CDATA #IMPLIED>
<!ATTLIST map value-type CDATA #IMPLIED>
<!ATTLIST array element-type CDATA #IMPLIED> (recently added)


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.

The field-type was intended to provide the same information as the existing xxx-type for collections and maps.

It sounds like you are thinking that you would like two different attributes, one for "element-type" and another for "implementation- type". Can you explain what the difference is? I only see the need for one value here: the type that can be stored in the field, element, key, or value.

Regards,

Craig


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

Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:[EMAIL PROTECTED]
P.S. A good JDO? O, Gasp!

Reply via email to