We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I want to def some native type with alias name.
type FirstName = String; type LastName = String; type ActorId = u32;
But, it get a error,
seaography::macros::Filter, | ^^^^^^^^^^^^^^^^^^^^^^^^^^ could not find `sea_orm_active_enums` in `entities`
source from
let filter_item = if default_filters.contains(&type_literal.as_str()) || type_literal.starts_with("Vec") { quote! { seaography::TypeFilter<#ty> } } else { let ident = format_ident!("{}EnumFilter", type_literal); quote! { crate::entities::sea_orm_active_enums::#ident } };
It may need to check whether the identifier is an enum
Generate a schema that uses ident directly
maybe the same as #76
use sea_orm::entity::prelude::*; #[derive( Clone, Debug, PartialEq, DeriveEntityModel, async_graphql::SimpleObject, seaography::macros::Filter, // could not find `sea_orm_active_enums` in `entities` // pub struct Filter { // pub or: Option<Vec<Box<Filter>>>, // pub and: Option<Vec<Box<Filter>>>, // actor_id: Option<crate::entities::sea_orm_active_enums::ActorIdEnumFilter>, // first_name: Option<crate::entities::sea_orm_active_enums::FirstNameEnumFilter>, // last_name: Option<crate::entities::sea_orm_active_enums::LastNameEnumFilter>, // last_update: Option<seaography::TypeFilter<DateTimeUtc>>, // } )] #[sea_orm(table_name = "actor")] #[graphql(complex)] #[graphql(name = "Actor")] // pub struct Model { // #[sea_orm(primary_key)] // pub actor_id: i32, // pub first_name: String, // pub last_name: String, // pub last_update: DateTimeUtc, // } pub struct Model { #[sea_orm(primary_key)] pub actor_id: ActorId, pub first_name: FirstName, pub last_name: LastName, pub last_update: DateTimeUtc, } type FirstName = String; type LastName = String; type ActorId = u32; #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation, seaography::macros::RelationsCompact)] pub enum Relation {} impl ActiveModelBehavior for ActiveModel {}
The text was updated successfully, but these errors were encountered:
feature: SeaQL#77
fd63fdb
Hey @huang12zheng, sorry for the delay and thanks for the report!!
Actually, I think this proposal can solve this issue. Which is more generic and foolproof:
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Motivation
I want to def some native type with alias name.
But, it get a error,
Proposed Solutions
source from
It may need to check whether the identifier is an enum
Generate a schema that uses ident directly
Additional Information
maybe the same as #76
The text was updated successfully, but these errors were encountered: