brianloveswords / streamsql

A streaming, backend agnostic SQL ORM heavily inspired by levelup
MIT License
67 stars 7 forks source link

Better error handling on typo'd tables in relationships. #9

Open brianloveswords opened 10 years ago

brianloveswords commented 10 years ago

typo'd tables in relationships.

For example, if I have something like this:

    program: {
      type: 'hasOne',
      local: 'programId',
      foreign: { table: 'programss', key: 'id' },
      optional: true,
    },

Notice the double "s" where there should only be one in "programs" – the error that comes back is BANANAS and doesn't point to the issue at all.

empty/undefined query items

If you do table.get({ id: null }) things go crazy.