Hi,
it seems to me, that the SQL type mapping defined in the JDO mapping file is
not used when querying just a single attribute from the class.
I have the following mapping file (extract):
<class name="UAOrderNumberRec"
identity="orderID" access="db-locked">
<map-to table="ADS_OrderNumberStore"/>
<field name="orderID" type="long" >
<sql name="orderID" type="integer"/>
</field>
<field name="day" type="java.sql.Timestamp" >
<sql name="day" type="timestamp"/>
</field>
<field name="project" type="java.lang.String">
<sql name="project" type="varchar" />
</field>
</class>
For the OQL query
select r.orderID from UAOrderNumberRec r where day >= $1 and day <= $2
I expected to get objects of java.lang.Long as specified by the field type.
Instead the query returns java.math.BigDecimal objects, the default mapping
for the SQL type NUMBER with an Oracle driver.
Is there a way to change my mapping file or the OQL query to return Long
objects? Is that a bug or a feature?
Thanks for your help,
Holger
--
Holger Delfs mailto:[EMAIL PROTECTED]
sd&m AG http://www.sdm.de
software design & management
Herrnstra�e 57, 63065 Offenbach am Main, Germany
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev