Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

odm form type guesser bug with associations #36

Closed
dbu opened this issue Feb 21, 2013 · 1 comment
Closed

odm form type guesser bug with associations #36

dbu opened this issue Feb 21, 2013 · 1 comment

Comments

@dbu
Copy link
Member

dbu commented Feb 21, 2013

the PHPCRTypeGuesser (which should be called PhpcrOdmTypeGuesser rather, its about phcpr-odm, not raw phpcr) has bugs with associations.

public function guessType($class, $property)
{
    if ($metadata->hasAssociation($property)) {
        $multiple = $metadata->isCollectionValuedAssociation($property);
        $mapping = $metadata->getAssociationMapping($property);
        # the method is called getAssociation()

        return new TypeGuess('phpcr_document', array(
            'dm' => $documentManager,
            # the phpcr_document does not know any option 'dm'. i guess it should be 'om'?
            'class' => $mapping['targetDocument'],
            'multiple' => $multiple
            ),
            Guess::HIGH_CONFIDENCE
        );
    }
@dbu
Copy link
Member Author

dbu commented Jan 20, 2014

fixed in #93

@dbu dbu closed this as completed Jan 20, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant