db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacob Hookom" <hooko...@uwec.edu>
Subject RE: query startIndex without endIndex
Date Thu, 01 May 2003 22:56:46 GMT
I had a similar problem, attached is a solution I did up for the
SqlGenerator.

| -----Original Message-----
| From: Jakob Braeuchi [mailto:jbraeuchi@gmx.ch]
| Sent: Thursday, May 01, 2003 4:35 PM
| To: OJB Developers List
| Subject: query startIndex without endIndex
| 
| hi all,
| 
| imo we have a problem (at least i have it with mysql) when using
| setStartIndex withou setEndIndex. in this case the endIndex is null
| which leads to a npe in mysql-driver.
| 
| i could solve this problem with the following simple patch in
| PersistenceBrokerImpl#getCollectionByQuery
| after line 1315
| 
| ...
|             if (endAt < startAt)
|             {
|                 // BRJ : make sure endAt > startAt
|                 endAt = iter.size();
|             }
| ...
| 
| i'm not sure about any side-effects of this patch, so i ask the gurus to
| have a closer look.
| 
| jakob
| 
| 
| ---------------------------------------------------------------------
| To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
| For additional commands, e-mail: ojb-dev-help@db.apache.org
| 
| ---
| Incoming mail is certified Virus Free.
| Checked by AVG anti-virus system (http://www.grisoft.com).
| Version: 6.0.476 / Virus Database: 273 - Release Date: 4/24/2003
| 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.476 / Virus Database: 273 - Release Date: 4/24/2003
 
  

Mime
  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message