i have found the same propriety valued differently depending if the object is a node or a document. node.GetPropriety("photos") and document.GetPropriety("photos"). The id is the same.
I think this depends on where you get the object (Node / Document) from. Once it is a cached version using only the published values and the other uses the currently saved but not published value. Could this be in your case?
It is a published content. I do change its value by code using the document object. It looks like the node hasn't been updated but in the content tree it is updated.
I assume that you have saved and published the node through code? Perhaps you may also call the UpdateDocumentCache to have the correct content on both objects?
Node != Document ?
Hu guys,
i have found the same propriety valued differently depending if the object is a node or a document.
node.GetPropriety("photos") and document.GetPropriety("photos").
The id is the same.
how's that possible?
I think this depends on where you get the object (Node / Document) from. Once it is a cached version using only the published values and the other uses the currently saved but not published value. Could this be in your case?
It is a published content. I do change its value by code using the document object. It looks like the node hasn't been updated but in the content tree it is updated.
GP
I assume that you have saved and published the node through code? Perhaps you may also call the UpdateDocumentCache to have the correct content on both objects?
you're right.. in one point I forgot to call UpdateDocumentCache method.
thank you for your help.
Gian Paolo
I wrote this wiki a while ago which might help: http://our.umbraco.org/wiki/reference/api-cheatsheet/difference-between-node-and-document
Jeroen
is working on a reply...