Skip to content

@JoinTable on entities without synchronization #3443

Closed
@kzoltan86

Description

Issue type:

[ ] question
[x] bug report
[ ] feature request
[ ] documentation issue

Database system/driver:

[ ] cordova
[ ] mongodb
[ ] mssql
[x] mysql / mariadb
[ ] oracle
[ ] postgres
[ ] sqlite
[ ] sqljs
[ ] react-native
[ ] expo

TypeORM version:

[x] latest
[ ] @next
[ ] 0.x.x (or put your version here)

Steps to reproduce or a small repository showing the problem:

Some of my entities are mapped to temporary tables. Therefore, turning off synchronization for these entities is a must for me. With that, TypeORM won't attempt to create tables with the given name. However, if one of these entities contain a ManyToMany relation with a JoinTable, TypeORM always creates (unless syncronization is turned off globally) the junction table.
This also leads to database errors while TypeORM tries to create foreign key constraints between the junction table and the nonexistent temp tables.

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions