我在mssql 创建了 两个表 user profile
当我使用 单表查询时
数据是可以正常显示的
但是我将 relations 启用 就会报
这里的userID 是typrorm 自动生成的 使用 @onetoone 就会这样
但是mssql 报错了
//?synchronize:?true, 我注释了
TypeOrmModule.forRoot({
type: 'mssql',
host: '127.0.0.1',
port: 1433,
username: 'sa',
password: '123456',
database: 'master',
entities:?["dist/**/*.entity{.ts,.js}"],
//?同步本地的schema与数据库?->?初始化的时候去使用
//?synchronize:?true,
logging: true,
//?logging:?['error'],
options:?{
"encrypt": false //?Windows?Azure时设置为true,其他设置为false
??????},
extra:?{
trustServerCertificate: true,
trustedConnection: true,
??????}
????}),
相似问题