1
I created an API in aqueduct initially. In it I created a serial model class and inside it I have information about autor
, ano
, idserie
, blz there wanted to create a class model episodes she would have the idepsodio
,episodios
, idserie
(here and Foreign key of the series table).
How can I relate the episodes to the series? This is the first time I’ve done API.
Follow down what I’ve done so far:
class Serie extends ManagedObject<_Serie> implements _Serie{
String get detail=>'$idserie by $autor';
}
class _Serie{
@primarykey
Int Idserie;
@Culumn()
String autor;
@Column()
Int ano;}
Right and how would I get her ? From the id 1 series with her episodes can give an example?
– Jameson
You can see better here https://aqueduct.io/docs/tut/executing-queries/#executing-queries
– Siloé Bezerra Bispo
final query = Query<Episode>(context).. Where((e) => e.serie.idSerie ).equalTo( 1 )
– Siloé Bezerra Bispo
Got it in the others I call series instead of episode in query?
– Jameson
I don’t understand what you mean.
– Siloé Bezerra Bispo
No Query<episode> instead of query<Serie> would be same episode
– Jameson