You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 4, 2019. It is now read-only.
Massive appears to successfully be connecting to the database, as witnessed by req.app.get('db').listTables() printing out the correct list of database tables. However, any attempts to persist or query data always return null.
This is one of the ramifications of save not being a real "upsert": it doesn't play well with primary keys that aren't generated from sequences or functions. Specifically, it will generate an UPDATE statement for tables like account no matter what, since creating a new record means you include an email. If you have to set a value for the primary key in new records, you need to use insert, although I note the docs don't currently mention this.
For what it's worth, I have only rarely had reason to prefer a natural over a synthetic key, and emails and other plausibly-mutable facts in particular make bad primary key candidates due to the possibility of breaking external links and references (bookmarks, reports, etc) when they change.
Summary
Massive appears to successfully be connecting to the database, as witnessed by
req.app.get('db').listTables()
printing out the correct list of database tables. However, any attempts to persist or query data always return null.Example
The text was updated successfully, but these errors were encountered: