This is a migrated thread and some comments may be shown as answers.

Error creating schema from model when using MariaDB and bigint unsigned

4 Answers 73 Views
Data Access Free Edition
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Nic
Top achievements
Rank 1
Nic asked on 12 Sep 2014, 09:08 AM
Using Data Access to create a database from the model using MariaDB 10.x

For some fields I have defined then as bigint unsigned as I am using Uint64 as the type in the model.

When the DDL is generated the statement for these fields is output as:

 `Id` bigint unsigned(20) AUTO_INCREMENT NOT NULL, -- _id

this causes an error from MariaDB as the line should read

Id` bigint(20) unsigned AUTO_INCREMENT NOT NULL, -- _id

Any idea if this has been fixed or if a work around exists?

Thanks

Nic

4 Answers, 1 is accepted

Sort by
0
Nic
Top achievements
Rank 1
answered on 12 Sep 2014, 12:48 PM
It seems that bigint types with MariaDB may also be a problem:

I've changed my bigint unsigned to bigint and now the create script will run but when I attempt to update the database from the model I get the following error:

"The migration of a primary key to a different type is not supported. PrimaryKey column Id of table 'test' is modelled as bigint(20). Database has bigint."

I've looked at the created table in MariaDB and it is a bigint with a length/set of 20.
0
Nic
Top achievements
Rank 1
answered on 15 Sep 2014, 08:50 AM
So finally figured this out - it seems that Data Access is setting the type to Decimal for a UInt64 which Maria isn't happy about. I changed this to bigint unsigned but DA leaves the precision at 20 (which was what it had set for the decimal). Changing the precision back to 0 solves all my problems.
0
Ady
Telerik team
answered on 17 Sep 2014, 10:20 AM
Hello Nic,

I am glad that you were able to find a workaround to the problem. We will investigate into the mapping issue for bigint unsigned and keep you updated.

Regards,
Ady
Telerik
 
OpenAccess ORM is now Telerik Data Access. For more information on the new names, please, check out the Telerik Product Map.
 
0
Ady
Telerik team
answered on 19 Nov 2014, 03:04 PM
Hello Nic,

 Sorry for the delayed reply.
A bug entry has been created for this and we will schedule a fix for it soon.
We will update you when it has been fixed.

Regards,
Ady
Telerik
 
OpenAccess ORM is now Telerik Data Access. For more information on the new names, please, check out the Telerik Product Map.
 
Tags
Data Access Free Edition
Asked by
Nic
Top achievements
Rank 1
Answers by
Nic
Top achievements
Rank 1
Ady
Telerik team
Share this question
or