FK column and related tables

When using sqlmetal.exe against a database I step into the following problems:

   - Some (not all) of the identifiers are written to the .cs file in what I guess is ASCII, even though they are Unicode identifiers (e.g. a column named "Descripcion"), which makes non-alphanumeric characters (ascii chars > 128) appear in the middle of the names, rendering the file unusable. 
   
   - Some (foreign-key member) columns are named the same as the parent table they refer to (e.g. FK column "Order" in table "OrderItem" is a foreign-key that points to table "Order"). The code generator generates two class members for the column and the parent table with the same name (which derives in compile errors).

I know this is pre-alpha, just thought I would give some feedback as soon as possible.

Regards,
Juan



Answer this question

FK column and related tables

  • iambad

    Another one: looks like the assemblies haven't been signed:

    error CS1577: Assembly generation failed -- Referenced assembly 'System.Data.DLinq' does not have a strong name

    And a question: can these assemblies be used with the whidbey beta2 compiler (barring the use of the new syntax, of course).

    Regards,
    Juan


  • Muhammad_Umair

    I posted a modified version of Miha Markic's Codesmith template on his forum, that solves the problems mentioned in the first post.

    http://cs.rthand.com/forums/ShowPost.aspx PostID=125

  • FK column and related tables