SeaQL / sea-orm

🐚 An async & dynamic ORM for Rust
https://www.sea-ql.org/SeaORM/
Apache License 2.0
7.04k stars 492 forks source link

Examples & Tutorials wanted #269

Open tyt2y3 opened 2 years ago

tyt2y3 commented 2 years ago

SeaORM aims to play well with other crates in the async ecosystem.

We now have an array of integration examples. But if you used SeaORM with a framework / library not already on our list, we'd appreciate you to submit an example project. Also, upgrading these examples to the latest dependencies is a regular maintenance work, and we'd also appreciate some help from time-to-time.

If you have made articles, tutorials, podcasts or videos reated to SeaORM and want to share it with the community, feel free to submit a PR and add it to the list.

YoshieraHuang commented 2 years ago

I write an axum version of actix_example at PR #297 .

billy1624 commented 2 years ago

Hi @YoshieraHuang, thank you so much for the huge PR!!

aaronleopold commented 2 years ago

Would you be interested in an axum+async-graphql example?

billy1624 commented 2 years ago

Hey @aaronleopold, definitely interested!

aaronleopold commented 2 years ago

@billy1624 awesome! I added my personal template that I use for my projects over the weekend to a fork, feel free to take a look. I'll be able to make a PR after work today.

billy1624 commented 2 years ago

Thanks!! @aaronleopold

joebnb commented 8 months ago

hi im new of rust and sea orm,would can be detail data loader tutorials,the example code seems lost some context

eg:

let cakes: Vec<cake::Model> = Cake::find().all(db).await?;
let fruits: Vec<Vec<fruit::Model>> = cakes.load_many(Fruit, db).await?;
let fillings: Vec<Vec<filling::Model>> = cakes.load_many_to_many(Filling, CakeFilling, db).await?; 

where is Filling and CakeFilling defined or import is that a table for connect this to tables ?

data loader was more recommend by use join,if there as a well document it will help a lot

martinbliss commented 1 month ago

I would also love to hear more about this. I've tried {entity}::Model, {entity}::Entity, {entity}::Relation and no success with any of them.