toJson method

  1. @override
Map<String, Object?> toJson()
override

Implementation

@override
Map<String, Object?> toJson() => isInnocuous
    ? <String, Object?>{}
    : <String, Object?>{
        if (allLazy != null) 'allLazy': allLazy,
        if (allEager != null) 'allEager': allEager,
        if (allowEntityFetch) 'allowEntityFetch': true,
        if (allowReadFile) 'allowReadFile': true,
        if (lazyEntityTypes != null && lazyEntityTypes!.isNotEmpty)
          'lazyEntityTypes':
              lazyEntityTypes!.map((e) => e.toString()).toList(),
        if (eagerEntityTypes != null && eagerEntityTypes!.isNotEmpty)
          'eagerEntityTypes':
              eagerEntityTypes!.map((e) => e.toString()).toList(),
      };