/**
* @param string $propertyName
* @param callable $toEntityTransform
* @param callable $toSqlTransform
* @throws InvalidPropertyException
*/
public function addGenericArrayMapping($propertyName, callable $toEntityTransform, callable $toSqlTransform)
{
$this->validateProperty($propertyName);
$this->storageReflection->addMapping($propertyName, $this->storageReflection->convertEntityToStorageKey($propertyName), function ($value) use($toEntityTransform) {
return PgArray::parse($value, $toEntityTransform);
}, function ($value) use($toSqlTransform) {
return PgArray::serialize($value, $toSqlTransform);
});
}