ryancp / sailng

Sails.js + Angular = Awesome
MIT License
163 stars 38 forks source link

Associations #1

Closed OsvaldoTCF closed 10 years ago

OsvaldoTCF commented 10 years ago

The great advantage of the new version, 0.10, is the support to the associations in the models. Could demonstrate this in your application? Thank you very much.

ryancp commented 10 years ago

This is definitely something I want to add as an example also. I think having a user model associated with each message would be a good start. It would allow us to show the use of the new populate method.

Thanks for the suggestion.

ryancp commented 10 years ago

I added an example of associating a user model with a message. Register as a new user and then create a new message. You can see that your user is now associated with the message at http://localhost:1337/api/message.