Laravel-mongodb: relations failed when the foreign key of type ObjectId

Created on 30 Oct 2014  路  3Comments  路  Source: jenssegers/laravel-mongodb

Hello,

i have an issue when i add any relations such as hasMany and the refrences already of type ObjectId the query return null but when i change the foreign key to string it worked out

any suggestions or other way to solve this ??

Most helpful comment

Any fix for this?

All 3 comments

I have the same issue.

The current implementation uses strings rather than MongoId's for relations due to some complications with the original Eloquent code. This is something on the todo list.

Any fix for this?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

viacheslavpleshkov picture viacheslavpleshkov  路  3Comments

bastiendonjon picture bastiendonjon  路  3Comments

naveedyasin picture naveedyasin  路  3Comments

tomartailored picture tomartailored  路  3Comments

yupangestu picture yupangestu  路  3Comments