Hi Jakob, I'm using the current version 0.9.9. Did this code change after the latest release? CVS access is difficult for me so it would be nice to know if it is worth the effort.
BTW, here are the first lines of the Exception stack trace that I get. Perhaps you can have a quick look at it. Thanks! Juergen java.lang.StringIndexOutOfBoundsException: String index out of range: 14 at java.lang.String.substring(String.java:1477) at org.apache.ojb.broker.accesslayer.sql.SqlQueryStatement.buildJoinTreeFor Column(Unknown Source) at org.apache.ojb.broker.accesslayer.sql.SqlQueryStatement.buildJoinTree(Un known Source) at org.apache.ojb.broker.accesslayer.sql.SqlQueryStatement.splitCriteria(Un known Source) at org.apache.ojb.broker.accesslayer.sql.SqlQueryStatement.<init>(Unknown Source) at org.apache.ojb.broker.accesslayer.sql.SqlSelectStatement.<init>(Unknown Source) at org.apache.ojb.broker.accesslayer.sql.SqlGeneratorDefaultImpl.getPrepare dSelectStatement(Unknown Source) at org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeQuery(Unknown Source) at org.apache.ojb.broker.accesslayer.RsIterator.<init>(Unknown Source) at org.apache.ojb.broker.singlevm.RsIteratorFactoryImpl.createRsIterator(Un known Source) at org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getRsIteratorFromQu ery(Unknown Source) at org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getIteratorFromQuer y(Unknown Source) at org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getCollectionByQuer y(Unknown Source) at org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getCollectionByQuer y(Unknown Source) at org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getCollectionByQuer y(Unknown Source) at org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.getCollectionByQuer y(Unknown Source) at org.apache.ojb.broker.singlevm.DelegatingPersistenceBroker.getCollection ByQuery(Unknown Source) -----Ursprüngliche Nachricht----- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Im Auftrag von Jakob Braeuchi Gesendet: Sonntag, 16. Februar 2003 14:32 An: OJB Users List Betreff: Re: Case insensitive queries together with path expressions hi jürgen, are you using an 'old' version of ojb ? with the current from cvs the following sample works fine: Criteria crit = new Criteria(); crit.addLike("upper(allArticlesInGroup.articleName)", "F%"); Query q = QueryFactory.newQuery(ProductGroup.class, crit, true); it even works with extent aware path expressions as you can see. SELECT DISTINCT A0.KategorieName,A0.Kategorie_Nr,A0.Beschreibung FROM Kategorien A0 INNER JOIN Artikel A1 ON A0.Kategorie_Nr=A1.Kategorie_Nr LEFT OUTER JOIN BOOKS A1E0 ON A0.Kategorie_Nr=A1E0.Kategorie_Nr LEFT OUTER JOIN CDS A1E1 ON A0.Kategorie_Nr=A1E1.Kategorie_Nr WHERE upper(A1.Artikelname) LIKE ? OR upper(A1E0.Artikelname) LIKE ? OR upper(A1E1.Artikelname) LIKE ? hth jakob Juergen Ebert wrote: >Is there a way to do case insensitive queries together with path >expressions? > >The following works fine: > Criteria crit = new Criteria(); > crit.addLike("upper(name)", name.toUpperCase()); > >But the following gives me a StringIndexOutOfBoundsException: > Criteria crit = new Criteria(); > crit.addLike("upper(supplier.name)", name.toUpperCase()); > >Thanks! >Juergen > > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]