Author Topic: Sql Server Datetime2 datatype length poorly generated in DDL  (Read 868 times)

bilon

  • EA User
  • **
  • Posts: 38
  • Karma: +0/-0
    • View Profile
Sql Server Datetime2 datatype length poorly generated in DDL
« on: September 15, 2017, 10:34:50 pm »
When setting DATETIME2 length to non-zero value, it's ok. For zero length EA generates DATETIME without length, which defaults to 7 in Sql Server. Does anybody know some workaround?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 8204
  • Karma: +193/-23
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Sql Server Datetime2 datatype length poorly generated in DDL
« Reply #1 on: September 15, 2017, 10:38:33 pm »
You can manipulate the MDA transform templates for DDL generation.

geert

bilon

  • EA User
  • **
  • Posts: 38
  • Karma: +0/-0
    • View Profile
Re: Sql Server Datetime2 datatype length poorly generated in DDL
« Reply #2 on: September 16, 2017, 12:28:46 am »
MDA transformations are quite new topic for me. After reading some kind of "documentation", I must say I have no idea what I should manipulate. There's some DDL Transformation, but this (according the documentation) is the process of transforming logical model into physical model. My problem is, that I have valid physical (data) model for Sql Server, but EA generates bad DDL script from it. Anyway, manipulating MDA transformations looks like pretty low level activity - it is in no way "simple workaround" of core product error.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 8204
  • Karma: +193/-23
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Sql Server Datetime2 datatype length poorly generated in DDL
« Reply #3 on: September 16, 2017, 01:51:07 am »
You are right, it's not MDA tranformation templates, but code generation templates.
The same low level template language, but if you dive into it you should be able to figure out why it create a datetime with lenght 7 and change it to your liking.

I don't think there's another solution.

Geert