github-starter-course icon indicating copy to clipboard operation
github-starter-course copied to clipboard

Update README.md

Open Pheogrammer opened this issue 3 years ago • 0 comments

I thought of having a link to the student developer pack as resources here

Pheogrammer avatar Sep 29 '22 17:09 Pheogrammer

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?

allthesignals avatar Sep 21 '19 18:09 allthesignals

Here is my options object... it doesn't appear that "query" or "generatePrimaryKey" ever get called:

  adapter: [
    PostgresAdapter, {
      url: process.env.DATABASE_URL,
      typeMap: {
        project: 'dcp_project',
      },
      generatePrimaryKey(type) {
        console.log('generate primary', type);
        return 'dcp_projectid';
      },
      query: function(query, params) {
        console.log(query, params);
        return query;
      },
    },
  ],

allthesignals avatar Sep 21 '19 18:09 allthesignals

Hi @allthesignals,

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.

gr0uch avatar Sep 23 '19 23:09 gr0uch