Skip to content
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.

fix filtering of joined/referenced fields, add custom types support #48

Closed
wants to merge 1 commit into from

Conversation

gegok
Copy link

@gegok gegok commented May 4, 2018

  1. typeCastField() is not used correctly for reference fields and joined entity fields
    because of wrong $metadata object usage

  2. filters doesn't support custom data types
    added $fieldType passing to setParameter();

add doctrine custom types support
@coveralls
Copy link

Coverage Status

Coverage decreased (-1.8%) to 83.57% when pulling 6e6c375 on gegok:tsp-fix-filters into e1a2868 on zfcampus:master.

Copy link

@TomHAnderson TomHAnderson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really like what you're pushing for in this PR. I'll be watching.

$format = null;
if (isset($option['format'])) {
$format = $option['format'];
}

$value = $this->typeCastField($metadata, $option['field'], $option['value'], $format);
$value = $this->typeCastField($typeCastMetaData, $typeCastFieldName, $option['value'], $format);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


protected function getTypeCastParams($queryBuilder, $metadata, $fieldName, $alias)
{
/** @var \Doctrine\ORM\Mapping\ClassMetadata $metadata */

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These comment docs should go above the function, yes?

@michalbundyra
Copy link
Member

@gegok We need tests to cover these changes and demonstrate the described issues.

@weierophinney
Copy link
Member

Closing, due to lack of tests.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants