Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Model not globally exposed #27

Closed
Nishchit14 opened this issue Jan 20, 2017 · 7 comments
Closed

Model not globally exposed #27

Nishchit14 opened this issue Jan 20, 2017 · 7 comments

Comments

@Nishchit14
Copy link
Contributor

Nishchit14 commented Jan 20, 2017

@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.

@Nishchit14 Nishchit14 changed the title Model not globally exosed Model not globally exposed Jan 20, 2017
@jaumard
Copy link
Contributor

jaumard commented Jan 20, 2017

Models are not expose globally, only trails model class is exposed globally if I'm not wrong

@jaumard
Copy link
Contributor

jaumard commented Jan 20, 2017

It's this.app.orm.User right ? Should work normally

@Nishchit14
Copy link
Contributor Author

@jaumard
Yes, It is this.app.orm.User. not working

@jaumard
Copy link
Contributor

jaumard commented Jan 20, 2017

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 ^^

@konstantinzolotarev
Copy link
Collaborator

@Nishchit14 Did you fix issue ? If not could you provide us with a bit more details ?

@Nishchit14
Copy link
Contributor Author

@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.

@jaumard
Copy link
Contributor

jaumard commented Feb 5, 2017

Closing this as it fix :) @Nishchit14 I think the other problem come from the generator not this repo

@jaumard jaumard closed this as completed Feb 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants