dist/aurelia-orm.js
function getFlat(entity, json) {
  let flat = {
    entity     : asObject(entity, true),
    collections: getCollectionsCompact(entity)
  };

  if (json) {
    flat = JSON.stringify(flat);
  }

  return flat;
}
function getFlat(entity, json) {
  let flat = {
    entity     : asObject(entity, true),
    collections: getCollectionsCompact(entity)
  };

  if (json) {
    flat = JSON.stringify(flat);
  }

  return flat;
}
function getFlat ( entity , json ) { let flat = { entity : asObject ( entity , true ) , collections : getCollectionsCompact ( entity ) } ; if ( json ) { flat = JSON . stringify ( flat ) ; } return flat ; }
Get a flat, plain representation of the entity and its associations.

@param {Entity}  entity
@param {boolean} [json]

@return {{}} {entity, collections}
Get a flat plain representation of the entity and its associations .