Hi,
I have an ejb ql that looks like
[SELECT OBJECT(a) From EntityUseDescriptionEntityBean a, EntityUseEntityBean e WHERE a.entityUseLongDescription LIKE ?1 AND a.localeCode=?2 AND e.entityUseId = a.entityUseId AND e.effectiveDate <= ?3 AND (e.sunsetDate is null OR e.sunsetDate > ?3) AND (e.organizationId is null OR e.organizationId = ?4)]
this is what i have in the orion-ejb-jar.xml
"SELECT a.ENTITY_USE_ID, a.LOCALE_CODE, a.ENTITY_USE_DESC, a.CREATED_BY, a.CREATED_DATE, a.UPDATED_BY, a.UPDATED_DATE FROM ENTITY_USE_DESC a , ENTITY_USE e WHERE ((a.ENTITY_USE_DESC LIKE '?1' ) AND (a.LOCALE_CODE = '?2' ) AND (e.ENTITY_USE_ID = a.ENTITY_USE_ID ) AND (e.EFFECTIVE_DATE <= ? ) AND ((e.SUNSET_DATE IS NULL ) OR (e.SUNSET_DATE > ? )) AND ((e.OU_ID IS NULL ) OR (e.OU_ID = ? )))
the 4 parameters are being passed properly and I am able to print the values but some how the value are not getting set properly in the QL. I used P6spy to look at the query that is being generated. and this is what it looks like
SELECT a.ENTITY_USE_ID, a.LOCALE_CODE, a.ENTITY_USE_DESC, a.CREATED_BY, a.CREATED_DATE, a.UPDATED_BY, a.UPDATED_DATE FROM ENTITY_USE_DESC a , ENTITY_USE e WHERE ((a.ENTITY_USE_DESC LIKE ''2002-02-21'1' ) AND (a.LOCALE_CODE = ''2002-02-21'2' ) AND (e.ENTITY_USE_ID = a.ENTITY_USE_ID ) AND (e.EFFECTIVE_DATE <= 3 ) AND ((e.SUNSET_DATE IS NULL ) OR (e.SUNSET_DATE > null )) AND ((e.OU_ID IS NULL ) OR (e.OU_ID = null )))
so if you see the values are not being populated properly. what am i doing wrong here. and interesting point is that this works perfectly fine in websphere and weblogic.
But OC4J somehow does not seem to like that query, i dont know why!!!
any suggestions...
thanks in advance