mean-expert-official / loopback-sdk-builder

Tool for auto-generating Software Development Kits (SDKs) for LoopBack
Other
399 stars 175 forks source link

In Model Foreign key type must be any and not number #552

Open MROALI opened 6 years ago

MROALI commented 6 years ago

What type of issue are you creating?

What version of this module are you using?

Please add a description for your issue:

In my poject i am using mlab mongoDb db, so the id generated in the model are like this : "_id": { "$oid": "5a3943206cc9fb0d44c283bc" },

So the id is not a number ==> but in the generated sdk model it is a Number.

Solution : The id must have the type any and not number. Samething to do with the foreignkey....

Thankyou in advance

MROALI commented 6 years ago

I found the solution, in fact i had to regenerate my sdk after changing my datasource to mongodb.