createModel method

Future<void> createModel(
  1. String collectionId,
  2. AbsExModel model
)

Implementation

Future<void> createModel(String collectionId, AbsExModel model) async {
  try {
    logger.finest('createModel(${model.mid})');
    await createData(collectionId, model.mid, model.toMap());
    // Delta 를 저장한다.
    if (collectionId.contains('_published') == false &&
        collectionId.contains('hycop_') == false) {
      //print('createModel()');
      HycopFactory.realtime?.setDelta(directive: 'create', mid: model.mid, delta: model.toMap());
    }
  } catch (e) {
    logger.severe("setModel(create) error", e);
    throw HycopException(message: "setModel(create) error", exception: e as Exception);
  }
}