You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error: macros that expand to items must be delimited with braces or followed by a semicolon
--> src/entities/category.rs:21:56
|
21 | #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation, seaography::macros::RelationsCompact)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in the derive macro `seaography::macros::RelationsCompact` (in Nightly builds, run with -Z macro-backtrace for more info)
error: proc-macro derive produced unparseable tokens
--> src/entities/category.rs:21:56
|
21 | #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation, seaography::macros::RelationsCompact)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: Syn(Error("`#[sea_orm]` got unknown `has_one` argument. Supported arguments are `belongs_to`, `from`, `has_many`, `on_delete`, `on_update`, `to`"))
--> src/entities/category.rs:21:56
|
21 | #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation, seaography::macros::RelationsCompact)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in the derive macro `seaography::macros::RelationsCompact` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `category::Model: ComplexObject` is not satisfied
--> src/entities/category.rs:8:5
|
8 | async_graphql::SimpleObject,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `ComplexObject` is not implemented for `category::Model`
|
= help: the following other types implement trait `ComplexObject`:
actor::Model
address::Model
city::Model
country::Model
customer::Model
film::Model
film_actor::Model
film_category::Model
and 7 others
= note: this error originates in the derive macro `async_graphql::SimpleObject` (in Nightly builds, run with -Z macro-backtrace for more info)
For more information about this error, try `rustc --explain E0277`.
error: could not compile `seaography-sqlite-example` due to 4 previous errors
Motivation
Currently, we only support
has_many
andbelongs_to
but nothas_one
. We should support it as well.Compiling the entity with
has_one
relation will fail.Proposed Solutions
Updating
seaography::macros::RelationsCompact
to parse and implement dataloader forhas_one
relation.The text was updated successfully, but these errors were encountered: