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: unexpected token
--> src\service\child_statical.rs:48:45
|
48 | #[derive(FromQueryResult, DerivePartialModel)]
| ^^^^^^^^^^^^^^^^^^
|
= note: this error originates in the derive macro `DerivePartialModel` (in Nightly builds, run with -Z macro-backtrace for more info)
Expected Behavior
the macro should accept the entity as a Path token
Actual Behavior
The macro only accept Ident token
Workarounds
using the Cake in the src/entities/prelude ( the src/entities is the out put dir of the command sea-orm-cli generate entity)
using a local mod use the entity, like following
mod local_quiz {usecrate::entities::quizes::Entity;use sea_orm::DerivePartialModel;use sea_orm::FromQueryResult;#[derive(Debug,FromQueryResult,DerivePartialModel)]#[sea_orm(entity = "Entity")]pub(super)structQuiz{pub(super)qid:i32,pub(super)quiz:String,}}
The text was updated successfully, but these errors were encountered:
Goodjooy
changed the title
[BUG] DerivePartialModel attr entity not support Path token
[BUG] DerivePartialModel attr entity not support syn::Path token
Feb 18, 2024
Description
DerivePartialModel
will produce error when setentity
aspath::to::entity::Entity
Steps to Reproduce
cake
for exampleExpected Behavior
the macro should accept the entity as a
Path
tokenActual Behavior
The macro only accept
Ident
tokenWorkarounds
Cake
in thesrc/entities/prelude
( thesrc/entities
is the out put dir of the commandsea-orm-cli generate entity
)Versions
????? sea-orm v0.12.12
?? ????? sea-orm-macros v0.12.12 (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 (*)
The text was updated successfully, but these errors were encountered: