0 votes

I have a simple question.
Most of time I'm using mySql for my purposes. And one day one of my colleague, who used "MySQL Workbench" tell me that it's possible to add (datetime) data type to fields in schema there, I searched for this information in ORM Designer (in version 1 and 2) but didn't find any information (except TimeStamp trigger).

My question or propose: Is it possible for now to add this type of fields, and if not it's good idea to add this type into ORM Designer.

asked in General Questions by (250 points)
edited by

1 Answer

+1 vote
Best answer

It depends on ORM Framework you're using. ORM Designer display for each ORM framework datatypes which are officially supported. You can also add new datatypes to configuration files manually, but it depends on ORM if they accept datatype defined like this.

For example if you would like to add new datatype to ORM Doctrine, edit file Doctrine.ormd2.cfg.xml. You can also override configuration by your own file. More here: http://www.orm-designer.com/article/ormd-developers-configuration-files-structure and add new type here:

<data-types>
  <data-type name="boolean" />
  <data-type name="float" />
 ....
</data-types>

But as I said before, it depends on ORM if new data type will be accepted.

answered by Skipper developer (135k points)
edited by

Thanks for help!
I did something like this and all stay on it's own places!

<data-types>
    ....
    <data-type name="datetime"  unified-name="@DATETIME"/>
</data-types>  

I'm glad I can help!