0 votes

In MySQL I would for example use 4,2 to denote "maximum 4 digits, 2 of which after the comma".
I can set this in Skipper, but it resets itself after I save.

Reproduce:

  1. set field type 'float'
  2. set 'size' = 4,2
  3. save entity
  4. re-open entity
  5. size will now be 4 instead of expected 4,2

Same with 4.2 or any other notation I could think of.

How can I set 4,2 ?

in Solved by (510 points)

1 Answer

0 votes
Best answer

This setting depends on the framework you use and is covered by ORM properties precision and scale. See example screenshot from Doctrine2:
enter image description here

by Skipper developer (74.8k points)
selected by

Thank you, I overlooked that setting.

Unfortunately it seems Propel2 does not support this feature;
the Skipper-generated XML uses 'scale' but Propel2 ignores it...

In the Propel2 examples I have available, the combination of properties size and scale are used. However if the SQL notation "size=4,2" is supported by Propel, we can add it to Skipper or modify the export results.

Can you please try it out and let me know which notation is properly processed by Propel?

My bad - I had removed the size on the float column during my testing.
Works perfectly, but you have (obviously :-) ) to add both size and scale, Skipper generates this XML:

<column name="funky_float" 
              description="Propel2 Float Test"
              type="Float" size="4" 
              required="true" scale="2"
 />

and Propel generates it correctly. So no need for changes to Skipper for this, but thank you for offering!