MySql and Uint32 primary key

2 posts, 1 answers
  1. Håvard
    Håvard avatar
    11 posts
    Member since:
    Dec 2009

    Posted 26 Nov 2010 Link to this post

    I've tried upgrading openaccess to latest version and got some errors so I removed the diagram and added it again with the wizard (reverse mapping and domain model). But now I'm having trouble with the primary keys:

    Error 14 Field: 'System.UInt32 Model.Person::idPerson': The type of the single field identity field must be System.Byte, System.Int16, System.Int32, System.Int64, System.Guid, System.Char or System.String.

    Will I have to change the id fields in mysql to signed int? (I'm having trouble doing this with my current mysql tools and its a lot of tables with a lot of foreign keys so I'd like to avoid this)

    Would setting the field to int32 or int64 in the openaccess diagram without changing db work?

    However I'd like not to set this manually, is there another way?

  2. Answer
    Damyan Bogoev
    Admin
    Damyan Bogoev avatar
    581 posts

    Posted 29 Nov 2010 Link to this post

    Hi Håvard,

    I am afraid that you should change the type of the identity fields to one of the following types: System.Byte, System.Int16, System.Int32, System.Int64, System.Guid, System.Char or System.String. This constraint will be removed in the near future.
    You could use the visual designer to modify the type of the identity properties by following these steps:
    -   Select the corresponding class property;
    -   Press F4 to open the Properties grid;
    -   Set the Type setting to the correct type;
    Hope that helps.

    Sincerely yours,
    Damyan Bogoev
    the Telerik team
    Accelerate your learning with industry's first Telerik OpenAccess ORM SDK. Download today.
  3. DevCraft banner
Back to Top