No, he didn't pledge to oppose it. He said all during the campaign that he agreed something had to be done, what he wanted was different than what the congress passed. I think it's an abomination and it has created a monster that is far worse than what we had before it was passed. I think he should have vetoed it, but he didn't. I think it was a mistake. Congress makes the laws, congress has to fix it.
We all thought it was unconstitutional, but SCOTUS didn't agree.