Model not globally exposed
Nishchit14 opened this issue · comments
@konstantinzolotarev @jaumard
In version 2.0.0
this.app.orm.User
and User.
both are undefined :(
It is not exposing Model
globally as per Trails's v2-latest standards.
Models are not expose globally, only trails model class is exposed globally if I'm not wrong
It's this.app.orm.User right ? Should work normally
@jaumard
Yes, It is this.app.orm.User
. not working
Test are still passing on Travis for the v2 version, maybe you miss to export your User model on the index.js file ? Or something like this ? Can you give more info on your use case please. As I don't know mongoose I may not be very helpful on this ^^
@Nishchit14 Did you fix issue ? If not could you provide us with a bit more details ?
@konstantinzolotarev
Yes, It's working now.
But yo trails
crashing.
Due to crash controllers
, policies
and config/web.js
are not being generated.
Also express
, trailpack-express
and trailpack-mongoose
are not auto installing.
Closing this as it fix :) @Nishchit14 I think the other problem come from the generator not this repo