Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cursor on joined table #2258

Open
D-Konopka opened this issue Jun 12, 2024 · 0 comments
Open

Cursor on joined table #2258

D-Konopka opened this issue Jun 12, 2024 · 0 comments

Comments

@D-Konopka
Copy link

Description

SeaORM assumes that column passed in cursor_by is in the original table.

Steps to Reproduce

  1. Select from table
  2. Join with another table
  3. use cursor_by using column from second table

Expected Behavior

Use table that I've specified.

Actual Behavior

SeaOrm assumes that column that I want to cursor_by is inside main table.

Reproduces How Often

Always.

Workarounds

I am not aware of any.

Reproducible Example

gallery_media::Entity::find()
        .left_join(galleries::Entity)
        .cursor_by(galleries::Column::Score);

This throws following error

Query Error: error returned from database: 1054 (42S22): Unknown column 'gallery_categories.score' in 'order clause'

Versions

├── sea-orm v0.12.15
│ ├── sea-orm-macros v0.12.15 (proc-macro)
│ │ ├── sea-bae v0.2.0 (proc-macro)
│ ├── sea-query v0.30.7
│ ├── sea-query-binder v0.5.0
│ │ ├── sea-query v0.30.7 (*)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant