db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig L Russell <Craig.Russ...@Sun.COM>
Subject [VOTE] Issue 139: Add attribute field-type to element field
Date Tue, 20 Dec 2005 21:23:31 GMT
Javadogs,

This will resolve an issue in the TCK where fields of type Object  
cannot be stored because there is no standard way to map them, even  
if usage restricts the type of instances assigned to the field. This  
is an issue in particular for relational mappings of classes that use  
interfaces or Object in the class definition.

This proposal would allow more specific field type to be specified at  
deployment time compared to compile time. For example, a field of  
type Object could be specified in the jdo metadata as containing only  
instances of type SimpleClass.

<proposal>
18.14 ELEMENT field
<!ATTLIST field field-type CDATA #IMPLIED>
The field-type attribute is used to specify a more restrictive type  
than the field definition in the class. This might be required in  
order to map the field to the datastore. To be portable, specify the  
name of a single type that is itself able to be mapped to the  
datastore (e.g. a field of type Object can specify field- 
type=”Integer”). Other values for this attribute are not defined.
</proposal>


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


Mime
View raw message