def get_all_model_fields(connector,model_name):
    """Utility function to get the full list of field names from a model, 
    INCLUDING field names that are eventually derived fro mthe connector's UNPACKING list in the manifest."""

    model = connector.MODELS[model_name]
    unpacking = connector.UNPACKING

    base_model_fields = set(x['dbname'] for x in model['fields'].values())
    full_model_fields = base_model_fields
    
    # get teh list of fields that are in the model and potentially unpacked
    unpackable_fields = set(x for x in unpacking.keys() if x in model['fields'].keys())

    for fieldname in unpackable_fields:
        unpack = unpacking[fieldname]
        # if the field actually is unpacked into another field
        if unpack:
            full_model_fields.add(unpack['dbname'])

    return full_model_fields