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

Allow full path for tables in joinable! macro #333

Closed
weiznich opened this Issue May 18, 2016 · 1 comment

Comments

Projects
None yet
3 participants
@weiznich
Contributor

weiznich commented May 18, 2016

It's currently only possible to pass an identifier as table to the joinable! macro (and also the #[belongs_to] and #[has_many] annotations).
Possible:

use some_module::my_table_a;

joinable!(my_table_a -> my_table_b (some_field));

Not possible:

joinable!(some_module::my_table_a -> my_table_b (some_field));

Results in:

error: no rules expected the token `::`
  --> src/lib.rs:19:28
19 |> joinable!(some_module::my_table_a -> my_table_b (some_field));
   |>                      ^^

@sgrif sgrif added the accepted label May 18, 2016

@Eijebong

This comment has been minimized.

Member

Eijebong commented May 23, 2017

The problem is that we can't just change those ident by path as a path cannot be followed by a -> nor by a ( so it would require changing to something like joinable!(foo::bar => baz::lol { foo::bar::field })

Eijebong added a commit to Eijebong/diesel that referenced this issue Jun 11, 2017

Eijebong added a commit to Eijebong/diesel that referenced this issue Jun 11, 2017

Eijebong added a commit to Eijebong/diesel that referenced this issue Jun 11, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment