Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
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!

In reply to Re^2: One to many, many to one relationships by rvosa
in thread One to many, many to one relationships by rvosa

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (5)
As of 2024-04-23 22:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found