Thank you for you reply, mitpatoliya.
Yes, they are content types (generic document types based on cm:content) .
I understand that I'm getting an error if I try to update an existing document based on a content type to another document with different content type because the documents are not based on the same or secondary content types.
The point that I'm puzzled is that if I choose the option (for CMIS) to overwrite in case of existing document, even though the document I'm sending has different content type, I do not get any error but succeed to upload the document. However, only the thing updated on the Alfresco is the document's modified date/time. The document retains whatever it had before the update including the content type and all the properties and the values.
The content types that I use are custom content types that I've added and all of them have cm:content as their parent.
Additionally, if I try to use other existing content types to update existing documents, exact same behavior is observed. i.e. if I use major/minor version option for updating document, I get the error (as expected). But if I use the overwrite option for updating, I don't get error but document is not replaced with the new one.
So I need to know if this is a behavior as designed, a known behavior which to be modified/fixed, etc. in order to create a specification for an application that I'm working on since it requires CMIS connection to Alfresco.
Regards,