Hello,

Thanks Werner.
Regarding the direct SQL call problem, I have a mapping like this :

<class name="com.fake.app.model.order"
         identity="OrderID" key-generator="seqgen">
    <description> Order </description>
    <cache-type type="none"/>
    <map-to table="Order" />
    <field name="OrderID" type="integer" required="true">
      <sql name="OrderID" type="integer"/>
    </field>
    <field name="Orderlines" type="com.fake.app.model.orderLines"
collection="collection" lazy="true">
                <sql many-key="OrderID"  />
        </field>
 </class>

The OQL/SQL request looks like this :

CALL SQL select o.orderID, ol.orderlineID from orders o, orderlines ol where 
o.orderID=ol.orderID(+) AS com.fake.app.model.order

When I run this example, I have :
java.lang.NullPointerException
        at org.exolab.castor.jdo.engine.SQLEngine.createCall(SQLEngine.java:430)
        at org.exolab.castor.jdo.engine.OQLQueryImpl.execute(OQLQueryImpl.java:513)
        at org.exolab.castor.jdo.engine.OQLQueryImpl.execute(OQLQueryImpl.java:473)
        at org.exolab.castor.jdo.engine.OQLQueryImpl.execute(OQLQueryImpl.java:465)


Werner, I would be glad to help you to implement some Oracle specifics.
I am downloading the latest release from your ftp server (I am behind a
firewall).
I will first have a look at the OQL engine and maybe send you some questions (on
the castor-dev list).

Best regards,

Bruno CHEVALIER



Selon Werner Guttmann <[EMAIL PROTECTED]>:

>
> Bruno,
>
> replies inline ...
>
> Werner
>
> > Hello,
> >
> > I am facing some performance issues with Castor. The web app I am working
> > on includes a search engine.
> > When I do a search, almost all the database is put on memory.
> > As no lazy mecanism is implemented for 1 to 1 relationships, Castor
> > create a lot> of objects that are not used.
>
> You'll be pleased that I am working on adding support for lazy loading for
> 1:1 relations right now. Please have a look at http://bugzilla.exolab.org
> for details about progress, etc.
>
> > So I have already made some optimizations :
> > 1/
> > I have created a specific mapping for the search engine. It works better
> > but takes sometimes 20 secondes for 1 query.
> >
> > 2/
> > I use CALL SQL in order to bypass the sql generation. It works fine as
> > long as I don't have 1 to many relationships.
> > As soon as a data object include a collection, it does not work anymore.
> What's your problem, iima ?
>
> > Does Castor support this kind of direct call?
> >
> > 3/
> >
> > The database is Oracle 9i. I am used to limit the number of rows returned
> > by a sql request (with the keyword rownum).
> >
> > Is there a way to limit the number of rows returned by the database with
> > Castor?
> Bad news first: Yes, there is. I recently (re)introduced suppot for LIMIT
> and OFFSET clauses in Castor's OQL engine. But unfortunately, there is no
> support for Oracle at the moment.
>
> Now the good news: If you can give help me a bit with Oracle specifics, I am
> willing to add support for Oracle as well (as well as for DB2).
>
> >
> > 4/
> >
> > Do you have some ideas to increase the performance? (Castor specific
> > only).
> >
> >
> > Best regards,
> >
> > Bruno CHEVALIER
> > Project Manager
> >
> >
> >
> > -----------------------------------------------------------
> > If you wish to unsubscribe from this mailing, send mail to
> > [EMAIL PROTECTED] with a subject of:
> >         unsubscribe castor-user
> >
>
> --
> NEU: Bis zu 10 GB Speicher f�r e-mails & Dateien!
> 1 GB bereits bei GMX FreeMail http://www.gmx.net/de/go/mail
>
>
>
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
>         unsubscribe castor-user
>


Selon Werner Guttmann <[EMAIL PROTECTED]>:

>
> Bruno,
>
> replies inline ...
>
> Werner
>
> > Hello,
> >
> > I am facing some performance issues with Castor. The web app I am working
> > on includes a search engine.
> > When I do a search, almost all the database is put on memory.
> > As no lazy mecanism is implemented for 1 to 1 relationships, Castor
> > create a lot> of objects that are not used.
>
> You'll be pleased that I am working on adding support for lazy loading for
> 1:1 relations right now. Please have a look at http://bugzilla.exolab.org
> for details about progress, etc.
>
> > So I have already made some optimizations :
> > 1/
> > I have created a specific mapping for the search engine. It works better
> > but takes sometimes 20 secondes for 1 query.
> >
> > 2/
> > I use CALL SQL in order to bypass the sql generation. It works fine as
> > long as I don't have 1 to many relationships.
> > As soon as a data object include a collection, it does not work anymore.
> What's your problem, iima ?
>
> > Does Castor support this kind of direct call?
> >
> > 3/
> >
> > The database is Oracle 9i. I am used to limit the number of rows returned
> > by a sql request (with the keyword rownum).
> >
> > Is there a way to limit the number of rows returned by the database with
> > Castor?
> Bad news first: Yes, there is. I recently (re)introduced suppot for LIMIT
> and OFFSET clauses in Castor's OQL engine. But unfortunately, there is no
> support for Oracle at the moment.
>
> Now the good news: If you can give help me a bit with Oracle specifics, I am
> willing to add support for Oracle as well (as well as for DB2).
>
> >
> > 4/
> >
> > Do you have some ideas to increase the performance? (Castor specific
> > only).
> >
> >
> > Best regards,
> >
> > Bruno CHEVALIER
> > Project Manager
> >
> >
> >
> > -----------------------------------------------------------
> > If you wish to unsubscribe from this mailing, send mail to
> > [EMAIL PROTECTED] with a subject of:
> >         unsubscribe castor-user
> >
>
> --
> NEU: Bis zu 10 GB Speicher f�r e-mails & Dateien!
> 1 GB bereits bei GMX FreeMail http://www.gmx.net/de/go/mail
>
>
>
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
>         unsubscribe castor-user
>



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

Reply via email to