Fixed a Bug where hasOneOrMany: did return NULL