[Tickets #10880] Re: Rdo: Make *- to-one-relations aware of "no relation" state

bugs at horde.org bugs at horde.org
Mon Jan 9 20:31:53 UTC 2012


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/10880
------------------------------------------------------------------------------
  Ticket             | 10880
  Updated By         | Ralf Lang (B1 Systems GmbH) <lang at b1-systems.de>
  Summary            | Rdo: Make *- to-one-relations aware of "no relation"
                     | state
  Queue              | Horde Framework Packages
  Version            | Git master
  Type               | Enhancement
  State              | Feedback
  Priority           | 1. Low
  Milestone          |
  Patch              |
  Owners             |
------------------------------------------------------------------------------


Ralf Lang (B1 Systems GmbH) <lang at b1-systems.de> (2012-01-09 21:31) wrote:

It seems like lazy [one|many]_to_one relations are resolved by a  
different part of code than eager relations.

lazy relations:
Base.php __get triggers a findOne on the target mapper with either a  
supplied query object (undocumented?) or the defined foreignKey  
field's value. A findOne without restrictions catches the first  
object, if any exist or null otherwise. I think I have fixed THIS

eager relations:
REFERENCING Objects with broken eager relations of either type (null  
value or wrong key value) simply aren't created. No exception is  
thrown until code wants to access the object's properties.
This seems to be handled by Horde_Rdo_Query generating an INNER JOIN  
which results in no object
No idea how to tackle this.





More information about the bugs mailing list