This is a migrated thread and some comments may be shown as answers.
MySql and Uint32 primary key
1 Answer 24 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Håvard
Top achievements
Rank 1
Håvard asked on 26 Nov 2010, 03:07 PM

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?

1 Answer, 1 is accepted

Sort by
0
Accepted
Damyan Bogoev
Telerik team
answered on 29 Nov 2010, 05:19 PM
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.
Tags
Databases and Data Types
Asked by
Håvard
Top achievements
Rank 1
Answers by
Damyan Bogoev
Telerik team
Share this question
or