[Closed] how to define default value for boolean

0 votes
asked Nov 7, 2013 in Solved by Schnaaf (400 points)
recategorized Nov 11, 2013 by Martin Freki Stradej

1 Answer

0 votes
answered Nov 7, 2013 by Martin Freki Stradej Skipper developer (74,840 points)
selected Jul 30, 2014 by Martin Freki Stradej
 
Best answer

Hi,
thanks for contacting us. Please let me know few specifying details: What ORM framework do you use and how do you currently define boolean in your schemas. Then I will be able to show you exactly how to do this in ORM Designer.
Martin

commented Nov 7, 2013 by Schnaaf (400 points)

Hi I use Doctrine2 ORM in a Symfony2 project. If I define a default value for the boolean attribute in ORMD this is not reflected in the exported xml

commented Nov 7, 2013 by Martin Freki Stradej Skipper developer (74,840 points)

Unfortunatelly Doctrine2 does not support importing default values and it cannot be implemented using ORM Designer.

To bypass this Doctrine2 feature you need to set the value manually. How to do that is discussed here:
http://stackoverflow.com/questions/3376881/default-value-in-doctrine

...