http://qs321.pair.com?node_id=604347


in reply to Re: One to many, many to one relationships
in thread One to many, many to one relationships

I think the question hinges on when the linkage information first becomes available: is it instrinsically known at the point when an object instance is created, or might it get introduced at some later stage as an update to an existing instance?
It might be introduced later - especially for nodes, which might never be linked to a taxon.

Also, I don't want to/can't change the api such that the link has to be created in the constructor.
If it makes sense that instances of each object type are able to exist independently, without necessarily being linked to one of the other object types, then it would make sense for link creation to be a separate process, which takes a taxon instance and a node or sequence instance, and updates each one by adding a reference to the other. (In the taxon, a reference to a node or sequence would be pushed onto an array of nodes or sequences; in a node or sequence, there can be only one reference to a given taxon.)
Yup, that's what I tend towards. Thanks!
  • Comment on Re^2: One to many, many to one relationships