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

"make:entity" generates string property for attribute "precision" integer needed #138

Closed
ghost opened this issue Mar 19, 2018 · 3 comments
Closed

Comments

@ghost
Copy link

ghost commented Mar 19, 2018

I created an entity with a decimal field and a precision with 2.
This is what the bundle generated:
/** * @ORM\Column(type="decimal", precision="2") */ private $cost;

While trying to update the schema i got that error:

[Type Error] Attribute "precision" of @Orm\Column declared on property App\Entity\Cost::$cost expects a(n) integer, but got string.

I change the string property to an integer and it worked.
/** * @ORM\Column(type="decimal", precision=2) */ private $cost;

@weaverryan
Copy link
Member

Yep, that looks legit. Thanks for the report - I’ll fix it as soon as I can (or maybe someone will beat me to it!)

@thomasisok
Copy link

I'm having the same issue with the length attribute for string types. It generates
* @ORM\Column(type="string", length="50")
Looks like maybe part of the same issue?

@weaverryan
Copy link
Member

Fixed in #139 and tagged in v1.3.1!

Thanks for the report guys!

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

2 participants