I want to make automatic title like node-333, using auto nodetitle module. When creating node there is no nid, so pattern node-[node:nid] gives me after saving new content "node-". When I edit again this node - title is changing as expected.
So I thought, that using rules I do simple "After saving node" condition "Node type is" and action Execute php node_save($node). But it is not working, I'm getting
PDOException: SQLSTATE[23000]: Integrity constraint violation
Does anyone deal with this or have some workaround?