[英]TypeORM relation
有人能告訴我為什么我不能在我的createQuerybuilder
中使用relation
:
let user = await this.conn.getRepository(UserEntity)
.createQueryBuilder('user')
.relation('orders')
.orderBy('user.id', 'ASC') // 'Property 'orderBy' does not exist on type 'RelationQueryBuilder<UserEntuty>.
我的錯誤是拋出.orderBy
,但 orderBy 沒有問題,因為當我在這個地方放一個不同的 function 時,這個錯誤仍然存在
謝謝你的幫助
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.