in

The ORM Foundation

Get the facts!

Removing underscores from DDL generation

Last post Sun, Apr 27 2008 17:38 by Cyberkruz. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • Fri, Apr 25 2008 14:25

    Removing underscores from DDL generation

     How would I go about adjusting settings so that the generated SQL DDL script doesn't contain underscores for the reference modes (ex: Person_Id)? I origonally posted this in tech support, but from the description it looks like this is the place for it.

    Filed under: ,
  • Fri, Apr 25 2008 19:26 In reply to

    Re: Removing underscores from DDL generation

    We're putting final touches on a new sourceforge drop, which will be available next week. The new drop features much better name generation defaults. Among other things, we allow you to control how the reference mode name is used in both references to entitytypes (mapped to columns with a foreign key, or fully absorbed columns) and for the primary identifier column in a table. You get separate control over all three types of reference mode, and can specify any combination of ReferenceModeName/EntityTypeName/ValueTypeName, and even mix in other text. Some of these options are currently available, but the current default for a popular reference mode is to just use the ValueTypeName, which contains an underscore (by default). The current options also control only the references to the entitytype, not a direct use of the field.

    Your current options (until next week):

    • Open the 'ORM Reference Mode Editor' tool window (available on the designer context menu), expand the first branch, and delete the _ from the FormatString for popular reference modes. This will rename all of the underscored value types
    • With the 'Relational' extension turned on, click on the diagram and set the 'PopularReferenceModeName' property (in the 'Relational Mapping' category) to 'Custom'. This should fix most references to these, but not all and does not touch identifying columns. The new options will be in this area, but give more flexibility and are respected all the time instead of some of the time.
    • (OK, this is really ugly) In the ORM Model Browser tool window in the 'Name Generation Settings' branch, click on 'Column Specific' and open the dialog associated with the Abbreviations property. Add abbreviations for all of the valuetypes with underscores in them. [This is just to be complete, you probably really don't want to do this.]

    Or you can wait until I get the new drop out. Terry Halpin is banging on it over the weekend and will let me know if he finds additional issues.

    -Matt

  • Sun, Apr 27 2008 17:38 In reply to

    Re: Removing underscores from DDL generation

     Thank you very much for your quick reply. I'm looking forward to the next drop, and your ORM Reference Mode Editor solution worked like a charm. Keep up the good work, and this project has come a long way since cohort 7 (mine).

Page 1 of 1 (3 items)
© 2008-2024 ------- Terms of Service