#1522 The Exist function does not work as expected if it has a Joins condition.

Closed
opened 3 months ago by kusana · 4 comments
kusana commented 3 months ago

The Exist function does not work as expected if it has a Joins condition.

ex.

session.Table("number").
	Select("player.id").
	Join("INNER", "order_list", "order_list.id = number.lid").
	Join("LEFT", "player", "player.id = order_list.eid")
has, err = session.Exist()

actual query

SELECT * FROM `number` LIMIT 1

expected

SELECT * FROM `number` 
INNER JOIN order_list ON order_list.id = number.lid 
LEFT JOIN player ON player.id = order_list.eid 
LIMIT 1
The Exist function does not work as expected if it has a Joins condition. ex. ``` session.Table("number"). Select("player.id"). Join("INNER", "order_list", "order_list.id = number.lid"). Join("LEFT", "player", "player.id = order_list.eid") has, err = session.Exist() ``` actual query ``` SELECT * FROM `number` LIMIT 1 ``` expected ``` SELECT * FROM `number` INNER JOIN order_list ON order_list.id = number.lid LEFT JOIN player ON player.id = order_list.eid LIMIT 1 ```
kusana commented 3 months ago
Poster

PR:#1520

why build was killed

PR:https://gitea.com/xorm/xorm/pulls/1520 why build was killed
lunny commented 3 months ago
Owner

@kusana CI server has some problems.

@kusana CI server has some problems.
kusana commented 3 months ago
Poster

@lunny
OK.
Please fix it after a while.

@lunny OK. Please fix it after a while.
kusana commented 3 months ago
Poster

Thanks, master merge.

#1520

Thanks, master merge. https://gitea.com/xorm/xorm/pulls/1520
kusana closed this issue 3 months ago
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.