Some PHPDoc fixes + fix #1
Merge pull request #2 from velosipedist/#1-error-with-composite-foreign-key

fixes #1