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
Hi, I'm using the json-api serializer with this adapter. JSON API serializer throws an error about toString of undefined— it's trying to stringify the id field received from Postgres, but that field is empty because it doesn't exist in the database.
In this adapter, I can get this to work by changing this and specifying my primary key:
I can't figure out how to do this through the public API. Do I need to extend the class to specify a primary key? Would that be the only way to do this?
The text was updated successfully, but these errors were encountered:
I guess I also don't know where in the stack this should be a concern... do I need to configure my Postgres adapter to specify which column is the "id" column, or do I need to configure my json-api serializer to point to a specific identifier value?
I don't think I considered adding a customization option to map fields to database columns, which is what I think you are asking for. It seems you have a database table where the primary key isn't id and I didn't anticipate that.
Hi, I'm using the json-api serializer with this adapter. JSON API serializer throws an error about
toString of undefined
— it's trying to stringify the id field received from Postgres, but that field is empty because it doesn't exist in the database.In this adapter, I can get this to work by changing this and specifying my primary key:
fortune-postgres/lib/index.js
Line 36 in 046b49f
I can't figure out how to do this through the public API. Do I need to extend the class to specify a primary key? Would that be the only way to do this?
The text was updated successfully, but these errors were encountered: