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

noreply at bugs.horde.org noreply at bugs.horde.org
Mon Jan 2 17:16:36 UTC 2017


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

Ticket URL: https://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              | Assigned
  Priority           | 1. Low
  Milestone          |
  Patch              |
  Owners             | Ralf Lang (B1 Systems GmbH)
------------------------------------------------------------------------------


"Ralf Lang (B1 Systems GmbH)" <lang at b1-systems.de> (2017-01-02 18:16) wrote:

Unfortunately, the join code for eager relations is not trivial to  
patch, at least I did not find an elegant way. to say "join result AND  
everything where the join key is null.

The alternative is also not great:

Always use the lazy code path (but on load instead of on request)

For broken relation keys, my current approach is to overload certain  
mappers to null the key on failure or on ::delete of the partner. It's  
sort of messy and should best be handled in the relation configuration:

          'hosts' => array('type' => Horde_Rdo::ONE_TO_MANY,
                           'foreignKey' => 'device_id',
                           'onDelete' => ['delete' | 'removeRelation']
                           'mapper' => 'APP_HostMapper'),







More information about the bugs mailing list