Dave,

I'm already using a separated mapping with cache=none to do this, but if you debug Castor can see that all objects are put in a "read-only" hashtable per transaction, this case is only a sample, think if I need to list all Orders from December? Report Generation using Castor, etc..., for this cases I don't need transactions.

Best regard's

Clóvis

Bicking, Dave B243 wrote:
Clovis,

I'm not sure if someone already replied to this, but it seems to me the
issue is that you're requesting the whole table.  Why not specify the item
you seek?  I agree that it would be nice to have a caching configuration
that would set a limit on the number of records (objects) pulled into memory
at one time.

  
-----Original Message-----
From:	Clóvis Wichoski [SMTP:[EMAIL PROTECTED]]
Sent:	Friday, February 14, 2003 1:54 PM
To:	[EMAIL PROTECTED]
Subject:	[castor-dev] [JDO] How to use OQL without
transaction/lock/cache

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

    



++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

CONFIDENTIALITY NOTICE: If you have received this e-mail in error, please immediately notify the sender by e-mail at the address shown.  This e-mail transmission may contain confidential information.  This information is intended only for the use of the individual(s) or entity to whom it is intended even if addressed incorrectly.  Please delete it from your files if you are not the intended recipient.  Thank you for your compliance. Copyright (c) 2003 CIGNA

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



  

Reply via email to