[Solved] Support for custom field type

0 votes
asked Jan 15, 2014 in Solved by jeremiahsmall (380 points)
recategorized Jan 17, 2014 by ludek.vodicka

Currently ORMDesigner gives us a pre-defined enumeration for Field Type. We have a use case in our Doctrine 2 project which calls for encrypting field contents, and the solution calls for a field type of "encrypted_string" rather than "string". Currently our only choice is to manually manage this after we've exported from ORMD.

1 Answer

+1 vote
answered Jan 15, 2014 by ludek.vodicka Skipper developer (140,450 points)
edited Feb 23, 2019 by ludek.vodicka
 
Best answer

Hi Jeremiah, if I understand correctly, you need to extend list of field data types like "string",'integer","double",.. ?

If so, it's pretty simple to add new data type. Only thing you need to do is to add new <data-type> element to Doctrine2 configuration file (or your custom cfg file):

<data-types>
   ...
  <data-type name="encrypted_string"/>
</data-types>
commented Feb 1, 2014 by jeremiahsmall (380 points)

Perfect, I just added a file to the repo next to the .ormdes file that contains this

<ormd2-configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <orm-configuration name="Doctrine2">
  <data-types>
   <data-type name="encrypted_string"/>
  </data-types>
 </orm-configuration>
</ormd2-configuration>
commented Feb 21, 2019 by alsbury (170 points)

The links in this answer are no longer valid

commented Feb 23, 2019 by ludek.vodicka Skipper developer (140,450 points)

thanks. links fixed

...