Query exception occur if a field name is equals to a database function/keyword ------------------------------------------------------------------------------
Key: OJB-133 URL: https://issues.apache.org/jira/browse/OJB-133 Project: OJB Issue Type: Bug Components: JDO-API, ODMG-API, PB-API Affects Versions: 1.0.4 Reporter: Armin Waibel Example: Criteria crit = new Criteria().addGreaterThan("abs(as)", new Integer(0)); Query q = QueryFactory.newQuery(Key.class, crit); A field of class Key is named "as" which will cause problems in addGreaterThan("abs(as)", new Integer(0)) and OJB will produce: SELECT ... AND abs(as) > ? The field "as" will not be replaced by the column name (A0.AS_), because OJB thinks it's a function or keyword. Same problems occur e.g. with count,min,max,avg,sum,upper,lower,distinct,as (and all other supported functions) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]