I have three tables and I am using Propel for my data layer.  Here is
a quick description of my tables:

Facility, which has an address defined in the Address table, and the
Address has a reference to the RefStateProvince table.

I've built a search index for facilities (using Zend Search Lucene),
which includes information from all three of the above tables.  For
each index hit, a primary key value to the Facility table is returned.

The problem I am having is that to look up the information about each
facility in my search index hits, I can't just do a doSelect() on the
FacilityPeer, because I also need information from the Address and
RefStateProv tables.

So if I have 10 hits in my search, I have to do 21 queries (1 from
facility, 10 from address, 10 from refstateprov).  This is horribly
inefficent.

There are only two ways I can think of solving this:

1) Write a custom doSelect() which does the query manually and creates
composite objects.
2) Store the data I want to retrieve in the index as unindexed values.

The ideal way I would think to solve this would be for Propel to be
able to efficiently create composite objects, but I don't see an easy
way to do this, since the Criteria objects only allow me to specify
conditions regarding the query results, not column selects that would
allow me to include columns from multiple tables.

Of course a view would be an ideal solution as well, but I haven't
seen anything about views with respect to the Symfony/Propel ORM
approach.

Does anyone else have any information on efficiently building object
graphs?

Thanks,
Steve
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to