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