Skip to content

class attribute for entity Field Type #683

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

Closed
alterphp opened this issue Sep 6, 2011 · 3 comments
Closed

class attribute for entity Field Type #683

alterphp opened this issue Sep 6, 2011 · 3 comments

Comments

@alterphp
Copy link

alterphp commented Sep 6, 2011

What says the actual doc :

$builder->add('users', 'entity', array(
'class' => 'Acme\HelloBundle\Entity\User',
));

This kind of 'class' reference products an error : "Expected argument of type "object", "string" given"

The working way i found to refer to the class :

$builder->add('users', 'entity', array(
'class' => 'AcmeHelloBundle:User',
));

@dlondero
Copy link
Contributor

Did you tried this?

$builder->add('users', 'entity', array(
'class' => 'Acme\HelloBundle\Entity\User',
));

@alterphp
Copy link
Author

Final 2.0 seems to fix it. I close it...

weaverryan added a commit that referenced this issue Sep 17, 2011
@weaverryan
Copy link
Member

Yes, both are right, but actually, using the alias name is better, so I've updated the reference.

Thanks!

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

No branches or pull requests

3 participants