Correct typecasting of has-many properties