[Tickets #10880] Re: Rdo: Make *- to-one-relations aware of "no relation" state
bugs at horde.org
bugs at horde.org
Thu Dec 22 18:14:45 UTC 2011
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 | New
Priority | 1. Low
Milestone |
Patch |
Owners |
------------------------------------------------------------------------------
Ralf Lang (B1 Systems GmbH) <lang at b1-systems.de> (2011-12-22 19:14) wrote:
> Rdo currently doesn't understand the concept of a missing relation.
> I'd suggest to either return no object or an exception.
> Consistence with to-many-relations is hard.
> These relations always return a list object, possibly an empty one.
> As to-one-relations are often used in chains (at least in my code)
> I'd prefer a clean exception over an empty result but the current
> situation is worst for me.
When there is a value in the ID field (0, 33, "somekey" as opposed to
'' or NULL), but the referenced object is no longer there, I get an
empty result rather than a wrong object or an exception. Trying to
blindly execute code on this not-an-object results in a crash.
Changing this too would be clearly BC breaking.
More information about the bugs
mailing list