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
Run index.ts file with ts-node with several console.log statements:
$ ./node_modules/ts-node/dist/bin.js --version
v8.4.1
$ ./node_modules/ts-node/dist/bin.js index.ts
increment
bootstrap
preBootstrapConfig
setConfig
uuid
uuid
setConfig
uuid
info 10/4/19, 12:51 AM - [Vendure Server] Bootstrapping Vendure Server (pid: 82903)...
info 10/4/19, 12:51 AM - [NestApplication] Nest application successfully started
info 10/4/19, 12:51 AM - [Vendure Server] =================================================
info 10/4/19, 12:51 AM - [Vendure Server] Vendure server (v0.3.3) now running on port 3000
Inspect generated db tables:
Table "public.product"
Column | Type | Collation | Nullable | Default
-----------------+-----------------------------+-----------+----------+-------------------------------------
id | integer | | not null | nextval('product_id_seq'::regclass)
createdAt | timestamp without time zone | | not null | now()
updatedAt | timestamp without time zone | | not null | now()
deletedAt | timestamp without time zone | | |
enabled | boolean | | not null | true
featuredAssetId | integer | | |
Expected behavior
Changing entityIdStrategy to UuidIdStrategy should result in uuid type of id column of all tables which entities inherit from VendureEntity.
Environment (please complete the following information):
@vendure/core version:
0.3.3
Nodejs version
v10.16.3
Database (mysql/postgres etc):
PostgreSQL 11
The text was updated successfully, but these errors were encountered:
This is because with the current implementation, the ID metadata that TypeORM uses is set as soon as the file containing the entity is evaluated. Up until now I have attempted to defer evaluation (i.e. importing) of the entity files until after the config has been set.
This is an error-prone approach, as evidenced by this issue! I am currently re-thinking how this can work so that no thought needs to be given to order of evaluation issues.
Describe the bug
Changing entityIdStrategy to
UuidIdStrategy
does not work.To Reproduce
Steps to reproduce the behavior:
synchronize: true
to your db settings:index.ts
file withts-node
with severalconsole.log
statements:Expected behavior
Changing entityIdStrategy to
UuidIdStrategy
should result inuuid
type of id column of all tables which entities inherit fromVendureEntity
.Environment (please complete the following information):
0.3.3
v10.16.3
PostgreSQL 11
The text was updated successfully, but these errors were encountered: