-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Description
Hi i have the following code expecting that i get one entity back which is not the case:
let new_artist = Artist::create()
.name("Artist")
.exec(&db)
.await
.unwrap();
Song::create()
.title("Crazy Good Song")
.artist(&new_artist)
.exec(&db)
.await
.unwrap();
let all_songs = Song::find_many_by_id()
.all(&db)
.await
.unwrap()
.collect::<Vec<Song>>()
.await
.unwrap();
assert_eq!(all_songs.len(), 1);
Is this a api misuse by me or a bug in the application?
Also i think having a Song::find_all()
would make sense from a readability and usability perspective
PS: I know logging is on the roadmap but here having tracing log the executed statement would make it easier to debug
Metadata
Metadata
Assignees
Labels
No labels