asDBObject<D> function

D asDBObject<D>(
  1. NUIDBEntityMapper<D> entity,
  2. dynamic value
)

Implementation

D asDBObject<D>(NUIDBEntityMapper<D> entity, dynamic value){
  if(value == null) return null;
  if(value is Map){
    return entity.toEntity(value);
  }
  return entity.toEntity(jsonDecode(value));
}