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
{{ message }}
Repository navigation
FormatException on conversion of object to send in database #237
Endpoint Future<void> initDatabase(Session session, String json, String type) async { final data = await jsonDecode(json); //Insert data into database for (var d in data) { switch (type) { case "Team": Team t = Team.fromSerialization(d); await Team.insert( session, t, ); break; case "Pilot": Pilot p = Pilot.fromSerialization(d); await Pilot.insert( session, p, ); break; case "Ranking": Ranking r = Ranking.fromSerialization(d); await Ranking.insert( session, r, ); break; } } }
Class yaml class: Team table: team fields: name: String
And here is the error message FormatException #0 SerializableEntity.unwrapSerializationData package:serverpod_serialization/src/serialization.dart:40 #1 new Team.fromSerialization package:f1_server/…/generated/team_class.dart:33 #2 RankingEndpoint.initDatabase
Activity