balderdashy / waterline-docs

WARNING: The content in this repo is out of date! See https://github.com/balderdashy/sails-docs for the most up-to-date documentation
452 stars 161 forks source link

Associations page - wrong identifier? #1

Closed EvanBurchard closed 10 years ago

EvanBurchard commented 10 years ago

The Pet model has the identity "user"
That's not right, is it?

mikermcneil commented 10 years ago

https://play.google.com/store/apps/details?id=com.keyes.crazycat.androidmarket&hl=en

mikermcneil commented 10 years ago

thanks :)

mikermcneil commented 10 years ago

fixed https://github.com/balderdashy/waterline-docs/commit/6d53049b3842122334b1c3a8348e2e74f05c1258

mikermcneil commented 10 years ago

btw for the record- when using raw Waterline, you'll need to explicitly set an identity (@particlebanana correct me if I'm wrong yeah?). When using Waterline via Sails, the identity will be inferred when moduleloader reads your models from disk (it just makes a half-witted guess by lower-casing the filenames). You can still use the identity property to override that, if you want to be able to refer to your model as something else (but the convention is all-lowercase)