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

[Experiment] TypeSafe Query Builder - Omitting table join expressions #427

Open
mk3008 opened this issue May 30, 2024 · 0 comments
Open

Comments

@mk3008
Copy link
Owner

mk3008 commented May 30, 2024

We would like to be able to omit the table join if the join expression is defined in the model class.

Currently, this kind of writing is necessary.

var query = Sql.From(() => od)
                .InnerJoin(() => o, () => o.order_id == od.order_id)

If the join expression is defined in the model class, it should be possible to write it as shown below.

var query = Sql.From(() => od)
                .InnerJoin(() => o)

Note that if there are multiple table joins (for example, creator and updater), this method cannot be used and a runtime error will occur.

Also, if you do not want to use the join expression defined in the model class, you should be able to avoid this by defining it manually. (Previous specifications)

@mk3008 mk3008 modified the milestones: 0.8.0, 0.8.2 May 30, 2024
@mk3008 mk3008 removed this from the 0.8.2 milestone Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant