Fixed #380. Ported propelorm/propel#590
Merge pull request #386 from marcj/issue-380_port-590

Fixed #380. Ported propelorm/propel#590