Hi Castor Team,

I need to execute an OQLQuery like SELECT obj FROM myapp.Customer obj and only display data for each Customer in result, but in Castor this put all Customer in memory until the transaction finish, how to avoid this?

code example:
...
oql = db.getOQLQuery("SELECT obj FROM myapp.Customer");
db.begin();
results = oql.execute(db.ReadOnly);
Customer customer = null;
while (results.hasMore()) { //if result as 108500 customers?
customer = (Customer)results.next();
System.out.println(customer.getName());
}
db.commit();
...

<class name="myapp.Customer" identity="oid" acces="read-only">
<cache type="none" />
<field type="string" required="false" name="oid" lazy="false" direct="false">
<sql read-only="true" typePrm="8" type="char" name="OID" dirty="ignore"/>
</field>
<field type="string" required="false" name="numero" lazy="false" direct="false">
<sql read-only="true" type="integer" name="name" dirty="ignore"/>
</field>
</class>


TIA

Clovis

----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev

Reply via email to