Re: Folks unlink API



On Fri, 2013-06-28 at 09:09 -0400, Erick Pérez Castellanos wrote:

I've being looking into some of the bugs we have at Contacts, and the
reason behind them is the unlink operation. So far the UI we have in
Contacts shows each persona composing a Contact (aka Individual in
folks jargon), and we're offering the option of separate those
personas (unlink them) The problem is that since the API folks has for
unlink, destroy and individual completely I can'y use that API.

Why not? If you want to remove one persona from an individual, unlink
the individual then re-link the remaining personas to form a new
individual. Is there some inherent reason that this isn’t possible?

I think we could discuss the choice of adding to folks some API with
this choice like:

    bool Individual.unlink (Persona persona);

Folks was consciously designed without an API like this, because once
you remove a single persona from an individual, it’s no longer the same
individual. The individual’s ID, and potentially all its properties,
have changed. Folks could take care of the property changes, but it
would be an API break to allow a single individual instance’s ID to
change after construct time.

Philip





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]