A node assignment is just an entry in the ezcontentobjecttreenode table. It says that node X references object Y. One node references one object, and an object can be referenced by 0 to N nodes.
Is this right: When an object is first posted, its main node is created with node assignment, and then later, if it is published to additional locations, new assignments are created.
What happens if the main node needs to be changed? Is just the assignment modified or? How to delete main node (in PHP ? :)
Wait wait.. if the second node is create when another location is added, what's the purpose of node assignments? Sounds to me that in this case it would be a 1:1 relationship, not 1:N.. Or are nodes used to store additional version info?
When you edit an object, you can add additional node assignments for it (in the old admin interface, eZ publish before the 3.5 release). When adding such a node assignment, the eznode_assignment table is used to store the assignment information for the specific version of the object. These assignments are not present in the content tree until the version gets published. The actual tree is represented by the ezcontentobject_tree table.
You can still assign the nodes while editing after 3.5.
however you haveto customise your edit.tpl to add a few fields:
UseNodeAssigments=1 and set MainNodeID to whatever you want
You can (have to ?) assign to several placements using other variables. I've used it for a website and works well. I don't have the details right now...