我有两个内容类型："汽车" 和"选项" 。 我的车可以有不同的选择，因此我可以将选项与参考模块相关联到汽车。但我的问题是我想指定每辆车/每种关系的选项的价格。
Seat - Airbag - 100 € Citroen - Airbag - 88 €
I have two content types: "Car" and "Options". My cars can have different options, so I could associate options to a car with References Module. But my problem is I'd like to specify the price of the option for each car/each relation.
Seat - Airbag - 100 xe2x82xac Citroen - Airbag - 88 xe2x82xac
The relation is not only a node reference, it has "metadatas".
For the moment, I plan to develop my own module, maybe "Relations" module will be the solution, but I tried it with no success.
How can I solve this problem?
If there is an existing contrib module for that, that would be Relation. It works at the level of Entities. It should provide a generic API/framework that can be used for what you describe.
If Relation doesn't fit your needs or is not ready for you, then writing a custom module would be the only option. For a custom module, I would work at the Entities level (with the help of the Entity API module), not directly in SQL. While Drupal doesn't provides scaffolding for Entities, it provide helper functions such as field_attach_form() or field_attach_insert() to deal with fields on entities. Unfortunately, the documentation on how to properly use entities is still scarce. The Model module is an attempt to help there since it aims to provide a model entity and entity administration interface to kick-start your entity development.
Field Collection is another option. IMO it has a better user interface than Relation out of the box, especially if the relationships can be considered directional.
A good module is the Dynamic properties module which does exactly what you want. There is a demo.
Maybe you would like to check the Entity Construction Kit (ECK), which helps you to develop entities, and maybe rules and relation integration for multiple values field collection.
As you point out, you have the option to develop your own module. In this case, that would be my advise.
Nodereference module (packaged in the CCK bundle) is not a generic relations-module. It can be used for what the description says it is: Defines a field type for referencing one node from another. With some creativity one can abuse this to create generic N:N and 1:N and even polymorphic relations, but that is never optimal; both technical/performancewise as usabilitywise.
Things you cannot do (well) with this module:
However, Writing your own solution comes with a lot of downsides, most notably:
 As such, many contributed modules (and even core) have quite often bugs where the input allows a lot longer texts or numbers then the database can store according to its schema: simply because developers did not write validators for them.