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

Drop SelectTwoMany::one() method #813

Merged
merged 1 commit into from
Jul 10, 2022
Merged

Conversation

billy1624
Copy link
Member

@billy1624 billy1624 commented Jun 22, 2022

PR Info

Breaking Changes

  • Drop SelectTwoMany::one() method: SelectTwoMany is for selecting models of a one-to-many relationship but SelectTwoMany::one() returns Option<(E, Option<F>)> and the return value is a pair of models instead of (E, Vec<F>) which is weird select result for a one-to-many relationship

@billy1624 billy1624 self-assigned this Jun 22, 2022
@billy1624 billy1624 marked this pull request as ready for review June 22, 2022 09:50
@billy1624 billy1624 requested a review from tyt2y3 June 22, 2022 09:50
@tyt2y3
Copy link
Member

tyt2y3 commented Jun 23, 2022

I guess we would like to add some API docs somewhere explaining the absence of such function.
But yeah it's like a bug

Copy link
Member

@tyt2y3 tyt2y3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documentation

@tyt2y3
Copy link
Member

tyt2y3 commented Jun 27, 2022

Actually, it might be "easy" to make two queries, first one(), and then find_related ?

@billy1624 billy1624 force-pushed the drop-select-two-many-fn-one branch from e637af2 to 43c7fe8 Compare June 28, 2022 03:20
@billy1624 billy1624 requested a review from tyt2y3 June 28, 2022 03:20
@billy1624
Copy link
Member Author

Docs updated :)

@tyt2y3 tyt2y3 merged commit 6e47d48 into master Jul 10, 2022
@tyt2y3 tyt2y3 deleted the drop-select-two-many-fn-one branch July 10, 2022 15:41
billy1624 added a commit to SeaQL/seaql.github.io that referenced this pull request Jul 13, 2022
tyt2y3 added a commit to SeaQL/seaql.github.io that referenced this pull request Jul 17, 2022
* Custom join condition (SeaQL/sea-orm#793)

* Migration does not depend on entity crate

* Define integer enum with repr[x] syntax

* Document datatype mappings (SeaQL/sea-orm#772)

* Cursor pagination (SeaQL/sea-orm#754, SeaQL/sea-orm#822)

* (de)serialize custom JSON types (SeaQL/sea-orm#794)

* Generate new migration file (SeaQL/sea-orm#656)

* Skip generating entity file for specific tables (SeaQL/sea-orm#837)

* Generate entity with date time crate option (SeaQL/sea-orm#724)

* Drop `SelectTwoMany::one()` method (SeaQL/sea-orm#813)

* Datatype mappings of primitives (SeaQL/sea-orm#850, SeaQL/sea-schema#75)

* Join with table alias (SeaQL/sea-orm#852)

* SQLx logging level (SeaQL/sea-orm#800)

* Insert with on conflict (SeaQL/sea-orm#791)

* Migrate generate should take file name as argument instead of option (SeaQL/sea-orm#870)

* Upgrade docusaurus to 2.0.0-beta.22

* What's new in SeaORM 0.9.0

* Move migration section forward

* Rename "Generating Database Schema" section to "Generating SeaQuery Statement"

* Fix broken links

* Edit

* Edit

* Edit

* Edit

Co-authored-by: Chris Tsang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Allow to fetch entity and all related ones
2 participants