I would like to use use Backreference to associate node type "item" with node type "list". Each item can only be present on one list, but there can be an unlimited number of items on one list.

It appears backreference only allows 1:N relationships, when N is defined using the number of nodereference fields (for example, if you want a 1:3 relationship, than you would have one node reference field on the "item" content type, and three node reference fields on the "list" content type).

I can't get to seem to get backreference to work with an undefined number of reference; For example, if content type "item" has a node reference field set to 1 value, and "list" has a node reference field set to "unlimited values", backreference appears to only create 1:1 relationships between the two node types (i.e. creating a new item effectively removes all old items from the list)

Is a 1:n relationship possible with backreference?

Thanks!

Comments

jcfiala’s picture

Version: 6.x-1.0 » 6.x-1.1
Status: Active » Postponed (maintainer needs more info)

It should be - I've got some similar tests in simpletest. Could you try this some more and let me know if you're still having this problem?

Yes, I know, I'm a bit late replying.

benmirkhah’s picture

I was trying to achieve the same 1:N relationship by allowing unlimited number of values in my node-reference field and ran into problems.

benmirkhah’s picture

So upon further trial I found out this is possible, just make your node-reference field on one of the content types to accept unlimited values, and it turned out my problem was not with back-reference which is great a module btw!

My problem was that in a multilingual setup my translations are synched to update certain CCK fields when the original node is updated, hence upon adding new node-references my translations also link to the translated version of that node (cck node-reference is smart enough to only allow pages with matching languages to link to one another) however the back-referenced node doesn't do the language check (which I'm glad it doesn't) and problem was when I ever had to edit/update the referenced node, upon saving it would complain about the language mismatched on the references, messy concept but only an issue when using internationalization module.