I've created some nodes programmatically and set the path alias. But when I then go into edit the node the 'Generate automatic URL alias' option is still checked, even though my alias is shown in the 'URL alias' textfield underneath, so consequently gets overwritten on save.
Also, when editing the node using the Entity module and entity_metadata_wrapper(), the alias is generated again and my alias is overwritten because of this problem.
When I load a node using node_load() I expect to see $node->path['pathauto'] but I don't, so I can't seem to disable it this way. Anyone have any advice?