export const filterEntityPropertiesForClient = (entity) => ({
    ...entity,
    fields: entity.fields.filter(field => !field.skipClient),
    relationships: entity.relationships.filter(rel => !(rel.skipClient ?? !(rel.persistableRelationship || rel.relationshipEagerLoad || rel.otherEntity?.jpaMetamodelFiltering))),
});
export const filterEntitiesForClient = (entities) => entities.filter(entity => !entity.skipClient);
export const filterEntitiesAndPropertiesForClient = (entities) => entities.filter(entity => !entity.skipClient).map(filterEntityPropertiesForClient);
