0 votes

Hi,
an unsigned INT column is currently generated as:

@ORM\Column(type="integer", unsigned=true)

Which throws an error:

[Creation Error] The annotation @ORM\Column declared on property Programmes\Entity\Programmes::$id does not have a property named "unsigned". Available properties: name, type, length, precision, scale, unique, nullable, options, columnDefinition

It should be this:

@ORM\Column(type="integer", options={"unsigned":true})

in Solved by (150 points)
recategorized by

2 Answers

0 votes
Best answer

Hi Kristof, thank you for info. We will update code export to next version.

by Skipper developer (141k points)
selected by
0 votes

Hi Kristof,

I checked ORM Designer2 configurations for Doctrine2 and currently there is no support for unsigned at all ;-). So if you have "unsigned" in your ORM property tree, it's probably your extension or it's imported from your project.

Anyway, to support unsigned in correct way you referred, I have extended configuration file Doctrine2.ormd2.cfg.xml at line 74 in this way:

<struct name="Field">
....
  <struct name="options">
    <attribute name="version" type="string"/>
    <attribute name="comment" type="string"/>
    <attribute name="unsigned" type="bool"/>
  </struct>
</struct>

After this change you wil get following ORM Properties:

Doctrine2 unsigned field

When you export your model, you will get:

 /** 
   * @ORM\Column(type="integer", nullable=true, options={"unsigned":true})
   */
  private $age; 

This update will be available in the next release. In the meanwhile you can edit your configuration file manually and add this one definition to line 74 by yourself:

<attribute name="comment" type="string"/>
by Skipper developer (141k points)

Hi Ludek,
sorry but we decided to ditch your tool, we just can't afford to use something that is so half-done / error-prone...

all the best,
Kristof

Hi Kristof,

I'm sorry for your decision. I hope you decide to give ORMD another try in the future.

Regarding to half-done ORM Designer, Doctrine2 is still evolving and we continuously reflect all these changes. "unsigned" property is relatively new and this is also the reason why current version doesn't support it.

Our project is based on user's feedback where we're trying to reflect new requests reported by our users ASAP. I tried to send you the solution for your problem immediately and off-course you can download latest beta which already includes this fix (http://support.orm-designer.com/402/orm-designer2-beta).

Anyway, thank you for your time you spent with ORM Designer and best regards
Ludek

and still not solved?
i have the latest skipper and still not fixed :/

It's solved as mentioned in post above. Latest stable release 3.0.1.1129 correctly handles it: http://i.imgur.com/RpNlHXv.png

What version are you using and what orm?

exactly the same: 3.0.1.1129
i've imported project from workbench, using doctrine2

it should be handled by orm designer as the information is already in the workbench model

I think you're talking about different issue than discussed in this thread. Issue reported in this thread was about invalid location of "unsigned" option in Skipper ORM properties and because of that also invalid location of exported unsigned property.

You're probably talking about a problem with importing "unsigned" property from MySQL workbench project, which wasn't reported yet.

Please fill new bug report as separate question and post as much information as possible (testing mysql workbench project, desired output, etc.)