[Answered] Type of data (datetime)

0 votes
asked Feb 27, 2013 in General Questions by Alexander (250 points)
edited Mar 7, 2013 by ludek.vodicka

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.

1 Answer

+1 vote
answered Feb 27, 2013 by ludek.vodicka Skipper developer (140,450 points)
edited Jun 17, 2014 by Martin Freki Stradej
 
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.

commented Feb 27, 2013 by Alexander (250 points)

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>  
commented Feb 27, 2013 by ludek.vodicka Skipper developer (140,450 points)

I'm glad I can help!

...