Re: Problem concerning Prefetching

From: Jean-Paul Le Fèvre (jean-paul.lefevr..ea.fr)
Date: Mon Jan 28 2008 - 11:24:56 EST


On Monday 28 January 2008, Michael Gentry wrote:
> Even with a one-to-many, Cayenne will still do the prefetches as
> shown. If you don't need everything at once, the batching idea
> suggested by Ari will probably be your best bet. Otherwise, you'll
> need to figure out a non-typical way of fetching the data which works
> right for your application. This normally isn't too difficult to do.
> Cayenne is great at the general case, but gives you the hooks to solve
> custom, non-typical problems when needed. Looking at your code, it
> looks like you do indeed want to fetch it all in.

Yes.
>
> That being said, unless I'm missing something,

Yes your are ;) (I've simplified what I wrote to the list)

> you don't care too much
> about having the Galaxy itself -- you are just using it to obtain the
> properties, which is what you really want. Why not invert your query?

I tried it before : it does not change a lot the time necessary to perform the
query.

>
> Also, since I tend to worry about security a bit, the following bit of
> code could allow for SQL injection (which is bad)

But which is a requested feature :)
The purpose of the application is to give users a tool to do interactively
datamining in the database. They want to use plain SQL scripts, java
beanshell scripts, possibly others. The access is read only and I don't care
too much about data integrity.

> Hope that helps,

Sure it does. Thanks you so much.

-- 
___________________________________________________________________

Jean-Paul Le Fèvre * Mail : LeFevr..onteny.org



This archive was generated by hypermail 2.0.0 : Mon Jan 28 2008 - 11:25:31 EST