-
-
Notifications
You must be signed in to change notification settings - Fork 16
Home
uki00a edited this page Jul 30, 2020
·
19 revisions
TODO: Move this page to .md in repo
TODO
$ dem update https://deno.land/std@v0.37.1
Using decorator metadata in Deno causes circular references between entities for the following reasons:
- Deno only supports
esnext
as a compilation target. - TypeORM is not yet compatible with
esnext
.
See also: https://github.com/typeorm/typeorm/issues/4103
Workarounds:
- use EntitySchema instead of ES decorators and decorator metadata.
- specify the column type with
ColumnOptions.type
as follows:
@Entity()
class User {
@PrimaryGeneratedColumn()
id: number;
@Column({ type: 'varchar' }) // or `@Column({ type: String })`
name!: string;
}
This decorator depends on decorator metadata.
-
ColumnOptions.type
is required.- This is due to lack of decorator metadata support.
- This is because in Deno, binary data is usually represented by a Uint8Array.
The following patterns are not supported:
/path/to/entities/*{.js,.ts}
Some types are treated differently from the original typeorm:
-
int8
,bigint
, andunsigned big int
should be mapped toBigInt
#88
driver | --allow-read | --allow-write | --allow-net | --allow-env | --allow-plugin | --allow-run |
---|---|---|---|---|---|---|
sqlite | ✔️ | ✔️ | ||||
postgres | ✔️ | |||||
mysql | ✔️ |