The following can be reproduced by using many stores, but in this example we're using seneca-knex-store against a postgres instance. Before you can run the code, create the racers table:
CREATE TABLE racers (
id VARCHAR(36) NOT NULL,
username VARCHAR(255) NOT NULL,
favorite_car VARCHAR(255) NOT NULL,
PRIMARY KEY (id),
UNIQUE(username)
);
After running the code, inspection of the database with psql shows that no racers were created, which means the first call to .save$ was not properly awaited on.
Replacing seneca.make$ with seneca.entity does fix this issue, but it would be nice (and less surprising) if seneca.make$ worked as well.
The following can be reproduced by using many stores, but in this example we're using
seneca-knex-store
against a postgres instance. Before you can run the code, create theracers
table:After running the code, inspection of the database with
psql
shows that noracers
were created, which means the first call to.save$
was not properly awaited on.Replacing
seneca.make$
withseneca.entity
does fix this issue, but it would be nice (and less surprising) ifseneca.make$
worked as well.