If you add an enum value as a parameter to a query, photon uses the integer value of the enum even if the underlying column was mapped using the string value (i.e. by mapping the column as a VARCHAR in the aggregate definition).
It is possible to work around this bug by calling .name() on the enum when declaring the photon query parameter.