In his youth he had lost his mother , and in her place his father had married a witch , who had laid a spell on him that he should turn into a dog , and never be released from the spell unless a Prince of the same name as himself allowed him to sleep at his feet the first night after his marriage .