There was an interesting (though small) thread on drupal-devel that started this line of reasoning:

http://lists.drupal.org/archives/drupal-devel/2005-03/msg00440.html

It made me think about per-relationship data, and how we're using it. We are only really considering the programatic use of such data. Why not allow users to stick per-relationship name=value pairs in the same way that it's been proposed we store data for features?

Right now, I'm using separate nodes to "join" nodes together if there's any relationship-specific data to be maintained. Consider this example done the current way that I've used relativity (example: represent a different cost for a given product that varies from one purchaser to the next):

Seller -> Product -> Cost -> Purchaser

Each of these are separate nodes: Seller, Product, Cost and Purchaser...and the Cost node has only one data field: cost.

Consider this arrangement:

Seller -> Product --(cost=$x.xx)--> Purchaser

In this arrangement, cost is merely attached to the Product -> Purchaser relationship instead of being maintained as a separate node type. When this value is calculated and/or varies wildly, it wouldn't be practical to maintain a separate Cost node for every possible price. In the app I'm working on at work, I have several of these 1-2 field flexinode types just sitting around cluttering up the environment. From a UI perspective, it's kinda strange to "attach a cost to this product, now specify a purchaser that this cost applies to" as compared to "Attach a purchaser to this product and specify a cost while doing so". I'm oversimplifying the ecommerce process here, but hopefully you get my point.

I could see the user interface being a nodeapi_form and nodeapi_validate hook that lays out [name] = [value] form fields similar to flexinode's field_select form. I suppose it would only make sense to put these fields in the child node when it's being attached. If a child has multiple parents, the data for each relationship would optionally be displayed with name, value and title of parent node. The fields could be specified at the relationship-type level or by users when the relationship is created.

Similarly from the drupal-devel thread, why make this specific to nodes? You could attach nodes to users if you wanted to. This discussion, however, belongs in a different issue :)

Comments

apaderno’s picture

Status: Active » Closed (outdated)

I am closing this feature request, as it's for a not supported Drupal version. If you want to see this feature implemented for a supported project version, please re-open this issue.