cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Gentry" <blackn...@gmail.com>
Subject Re: Problem concerning Prefetching
Date Mon, 28 Jan 2008 14:56:32 GMT
Hi Jean-Paul,

It looks like galaxy -> galaxy_component_properties is a to-one
relationship, which would cause Cayenne to issue multiple selects like
this since it tries to resolve each fault individually.

Given your manual SQL statement:

select galaxies.number, galaxy_component_properties.mass_of_baryons
      from galaxy_component_properties
      join galaxies on galaxy_component_properties.galaxy_id = galaxies.id
      where some_clause
      order by galaxies.number;

It looks like you don't actually care about having actual Cayenne
objects (it looks like you only care about having two of the
attributes)?  If this is the case, you could use an SQLTemplate and
raw data rows to only fetch in those two properties.  If this isn't
the case, let us know and we'll give you other ideas.

Thanks,

/dev/mrg

Mime
View raw message