balderdashy / sails

Realtime MVC Framework for Node.js
https://sailsjs.com
MIT License
22.84k stars 1.95k forks source link

NullPointerException pk.type for model even if you set schema to false #3664

Closed akhan-netfore closed 8 years ago

akhan-netfore commented 8 years ago

Sails version:0.11.0 Node version:4.2.1 NPM version:2.14.7 Operating system:Ubuntu 14.04


In my model, I have following class properties:

schema: false,
autoPK: false
attributes: {
 name: 'string'
}

when I do a find on the model and pass in a criteria 'id', sails throws a NullPointerException on normalize.js:47

      if (context.attributes[pk].type == 'integer') {

If I set the schema to be false, sails should protect its

particlebanana commented 8 years ago

This issue was moved to balderdashy/waterline#1326