[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.rt.eclipselink] Problem with DB2

We have one more problem in the area of the JPA as such in eclipse link. We are using DB2 server as back end and simple JPA query we are running.



Query is

SELECT v.schemaId, v.vuiId, v.vuiType, v.locale, d.label, d.propShort, d.propLong FROM VUIEntity v, VuiDisppropEntity d WHERE (d.vuiId = v.vuiId) AND (d.schemaId = v.schemaId) AND (d.fieldId = 0) ORDER BY v.schemaId



Works on two simple tables



One of the table looks like


RECORDID INTEGER 4 No


SCHEMAID INTEGER 4 No


FIELDID INTEGER 4 No


LISTINDEX INTEGER 4 No


VUIID INTEGER 4 No


"LABEL" VARCHAR 254 Yes


PROPSHORT VARCHAR 4000 Yes


PROPLONG CLOB 10485760 Yes


SRVPROPSHORT VARCHAR 255 Yes


SRVPROPLONG CLOB 10485760 Yes







And in the entity definition

This FIELDID  field is treated as integer.





For some reason the eclipse link is generating query like

SELECT t0.SCHEMAID, t0.VUIID, t0.VUITYPE, t0.LOCALE, t1.LABEL, t1.PROPSHORT, t1.PROPLONG FROM vui t0, field_dispprop t1 WHERE ((((t1.VUIID = t0.VUIID) AND (t1.SCHEMAID = t0.SCHEMAID)) AND (t1.FIELDID = '0')) AND (t1.FIELDID = '0')) ORDER BY t0.SCHEMAID ASC



t1.FIELDID = '0' à gets rejected by the DB2 server as this is not a character field.



This issue is blocking us.