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

Different Data Types then Default Data Types

2 Answers 59 Views
Databases and Data Types
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Riyasat
Top achievements
Rank 1
Riyasat asked on 13 Jul 2014, 01:12 PM
Hi,
I am trying to use Data Access with MySQL. My scenario is DB First. I am having few issues

1- when I use Telerik Data Access Domain Model, at the last step where we can choose Mapping type there I selected Xml but it always generate customer.generated.cs file no XML in it.

2- Is there a possibility to provide custom data type during the wizard, e.g I have in MySQL column type binary(16) which is being used for storing the GUIDs and they are being used as primary key which also have foreign key references, but when I use Telerik ORM it takes it as byte[] which is default behavior of DA. The question is can I specify somewhere that if binary(16) comes in then treat it as System.GUID ?

Thanks..

//Riyasat 

2 Answers, 1 is accepted

Sort by
0
Riyasat
Top achievements
Rank 1
answered on 13 Jul 2014, 10:19 PM
Well I have found the solution to my problem. Thanks to Telerik Open Access / Data Access. In case if some one else is in same situation and come to this forum here is what I did.

1- Generated rling from the default t4template
2- Right click in empty space of Visual Designer
3- Select Model Operations
4- Select Members from Display Mode
5- Click on Advanced Search checkbox that is just in front of the Reset (Blue color)
6- Select SQL Type you want to change (in my case I selected binary)
7- In the right most box (Operation) select Change CLR Type
8- From the settings -> Set CLR Type To <-- here you select the targeted type (in my case it was GUID)
9- Select all the entities in the middle box
10- Finally click on execute

and here you go now, if you added new table or column or changed something to that field you might need to do the same process again.

Happy Coding..

///Riyasat 

0
Kristian Nikolov
Telerik team
answered on 16 Jul 2014, 06:39 AM
Hello Riyasat,

We are glad you have resolved your situation and thank you for providing this information for other users that might be interested.

As for your first question about XML mapping - this option specifies what will be the mapping for the model. The XML for the mapping is actually generated in the .rlinq file itself to keep the code of the persistent classes as clean as possible. Note that editing the XML in the .rlinq directly is not recommended.

I hope this helps. Should you have additional questions feel free to post at our forums again.

Regards,
Kristian Nikolov
Telerik
 
OpenAccess ORM is now Telerik Data Access. For more information on the new names, please, check out the Telerik Product Map.
 
Tags
Databases and Data Types
Asked by
Riyasat
Top achievements
Rank 1
Answers by
Riyasat
Top achievements
Rank 1
Kristian Nikolov
Telerik team
Share this question
or