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

Re: [Pulp-list] Importer Sync APIs



We may want to model this as a 'references' association instead of
parent/child. Parent/child implies ownership or a hierarchical
relationship which I don't think exists here.

So, I just wrote out a big e-mail explaining why parent/child was better than arbitrary (potentially bi-directional) relationships as you suggested. And as I was writing it, I managed to convince myself that removing the parent/child-ness of it is probably a good idea. Any ambiguity in what the relationship meant I kept figuring the Consumer Profilers could resolve.

For now, the conduit API change is simple. I'll just make it something like:

link_units(from_unit, to_unit)

If it makes sense to have a bi-directional relationship, they can call it twice (or we can add some syntactic sugar to that one call to automatically establish both sides of it or to link multiple to_units at once -- all that sugar can be added later).

It'll take me a bit longer to change the fact that in the database the relationship uses the term "children", so I'll hold off on that side of it for a bit while the implications of this sink in.

--
Jay Dobies
Freenode: jdob @ #pulp
http://pulpproject.org | http://blog.pulpproject.org


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