关于Join方法添加别名以及级联开发再灵活一点的建议 #1501
Labels
No Label
backport/done
backport/v1
blocked
db
oracle
db
sqlserver
duplicate
feature
cache
frontport/done
frontport/main
invalid
kind
breaking
kind
bug
kind
build
kind
dependencies
kind
docs
kind
driver
kind
enhancement
kind
feature
kind
performance
kind
proposal
kind
question
kind
refactor
kind
testing
need
feedback
need
test
proposal:accepted
RaspBerry Pi
regression
skip-changelog
upstream
wip
wontfix
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: xorm/xorm#1501
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
目前Join()方法支持Left, Inner, Right等连接,每次都得手动写怎么连接,有点多余,建议添加几个别名。
如:
Join('LEFT', 'user', 'user.id = t.id')
别名
LeftJoin('user', 'user.id = t.id')
级联查询呢,目前只支持NoCasecade()开关,一刀切的感觉。 有时候,并不是所有都需要或者都不需要,也许只用到了部分。所以,想的这个级联开关能否再精准或灵活一点,就像Cols() 和Omit()一样,可以指定哪些在本次查询不级联。
比如:
Casede('结构体类型') // 指定级联或不级联
Casede(1) // 指定级联层级,比如只级联第一层
...