Hey guys,
I have the following question - how do I make propel hydrate 1:1
relationships automatically ?
When we have a normal 1:m relationship the peer class provides methods
like doSelectJoinWhaever, but no such method is available when using a
1:1
The relation itself works just as it's expected to, but every call to
get the related object results in an extra query.

from my schema.yml:

  record:
    id:                 ~
    sequential_number:  { type:      integer, required: true }
    status:             { type:     smallint, required: true }
  record_option:
    id:               { type: integer, primaryKey: true, foreignTable:
record, foreignReference: id, required: true, onDelete: cascade }  ##
1:1 relational mapping
    option0:       { type: boolean, default: false }
    option1:       { type: boolean, default: false }

$record->getRecordOption()->getOption0();  <- an extra query here, and
given that I have to show MANY records at once (many being a random
number between 10 and 5000, without pagination - as required by
application specifications) this could prove to be a pretty serious
issue

Simply adding a join clause to the criteria does nothing, I suppose I
need to override the hydration.
I have used the method described here:
http://trac.symfony-project.org/wiki/ApplyingCustomJoinsInDoSelect on
previous projects, but this project uses Propel 1.3 and this is for
Propel 1.2

Any help would be deeply appreciated
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to