Entity and dotConnect for mysql

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
Z10y_Tap0k
Posts: 3
Joined: Mon 05 Sep 2011 06:35
Contact:

Entity and dotConnect for mysql

Post by Z10y_Tap0k » Mon 05 Sep 2011 07:05

Hi! I use dotConnect for MySql >= 2 years; But I'm just disappointed every time.

Entity Developer && dotConnect for MySql has support in connection string param "Binary as Guid" ?? I think no :(

I generate entity (edmx || edml) and Guid Columns has type Binary!



If i generate edml he don't have navigation properties (forignkeys)! With edmx i have it.
I use jumptable for relationship, example:
table1 { table1Guid Binary(16) Primary } ->
jumptable { table1Guid binary(16) Primary FK , table2Guid binary(16) FK } ->
table2 { table2Guid binary(16) Primary }

With simple relationship all okey:
table1 { table1Guid Binary(16) Primary } ->
table2 { table2Guid binary(16) Primary , table1Guid binary(16) FK }

Image

But, if i'm generate DataSet -> Guid Columns has type Guid!

Entity connection string:
metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=Devart.Data.MySql;provider connection string="User Id=root;Host=192.168.0.1;Database=server;Persist Security Info=True;Binary As Guid=True;Tiny As Boolean=True"

Perhaps, i can do something wrong?



When i generate edml i have NullReferenceException and list tables is emty. when i group by database and ungroup - list tables is load.

Image

If i drop-down list Tables in "Database Explorer - Entity Developer" i have NullReferenceException
This exception only if in database exist procedure. I'm login in database by root account!



MySql: 5.5.8-enterprise-commercial-advanced-log
dotConnect for MySQL: 6.30.202.0 Pro with Entity Developer 4.0.30.0

P.S. I can not recover the password on my old account insan2006 (fors2006). It is blocked!?
P.P.S. I'm setup dotConnect for MySql with Sync Framework. And every as good (batching, filtering, bidirectional, client sqlce). I can provide example if needed.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Wed 07 Sep 2011 09:43

Z10y_Tap0k wrote:Entity Developer && dotConnect for MySql has support in connection string param "Binary as Guid" ??
Thank you for your suggestion. We will support the "Binary As Guid" connection string parameter in runtime of Entity Framework, Entity Developer, EDM Wizard and notify you when it is implemented.
Z10y_Tap0k wrote:If i generate edml he don't have navigation properties (forignkeys)! With edmx i have it.
I use jumptable for relationship, example:
table1 { table1Guid Binary(16) Primary } ->
jumptable { table1Guid binary(16) Primary FK , table2Guid binary(16) FK } ->
table2 { table2Guid binary(16) Primary }
I have tried to reproduce the problem with the following script:

Code: Select all

DROP TABLE jumptable;
DROP TABLE table11;
DROP TABLE table22;

CREATE TABLE table11(
  table11Guid BINARY(16) PRIMARY KEY
) ENGINE = INNODB;

CREATE TABLE table22(
  table22Guid BINARY(16) PRIMARY KEY
) ENGINE = INNODB;

CREATE TABLE jumptable(
  table11Guid BINARY(16),
  table22Guid BINARY(16),
  FOREIGN KEY (table11Guid) REFERENCES table11 (table11Guid),
  FOREIGN KEY (table22Guid) REFERENCES table22 (table22Guid),
  PRIMARY KEY (table11Guid, table22Guid)
) ENGINE = INNODB;
By default, the "Detect ManyToMany Associations" option is enabled in Entity Developer. So there is no Jumptable class in conceptual part, because the ManyToMany association is generated between the Table11 and Table22 EntityClasses.
If we clear the storage part of our model, disable the "Detect ManyToMany Associations" option (right click on the Diagram surface > Edit Model Settings > Model > General), drag&drop table11, table22, jumptable on the Diagram surface from Database Explorer, there will be three EntityClasses in conceptual part (Table11, Table22, Jumptable) with two OneToMany associations.
Is this behaviour the same in your environment? If not, tell us the exact steps we should follow to reproduce the problem and show the screenshot of your model.
Z10y_Tap0k wrote:When i generate edml i have NullReferenceException and list tables is emty. when i group by database and ungroup - list tables is load.
We cannot reproduce the problem at the moment. Please try to localize the issue:
a) does it persist with a particular database or with all databases on your MySQL server?
b) have you tried another MySQL server?
b) you are using Windows 7 x86, aren't you?
Z10y_Tap0k wrote:This exception only if in database exist procedure.
Could you please post here or send us the DDL/DML script of this particular procedure and related objects so that we can reproduce NRE in our environment?
Z10y_Tap0k wrote:P.S. I can not recover the password on my old account insan2006 (fors2006). It is blocked!?
Try using this form to recover your password: http://www.devart.com/forums/profile.ph ... ndpassword. Notify us about the results. Specify if you are getting any errors.
Z10y_Tap0k wrote:P.P.S. I'm setup dotConnect for MySql with Sync Framework. And every as good (batching, filtering, bidirectional, client sqlce). I can provide example if needed.
Give us a detailed description of the problem and, if possible, send us a small test project with the corresponding DDL/DML script.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Wed 07 Sep 2011 12:26

We have supported the 'Binary As Guid' connection string parameter in Entity Developer. Look forward to the next build of dotConnect for MySQL.

Z10y_Tap0k
Posts: 3
Joined: Mon 05 Sep 2011 06:35
Contact:

Post by Z10y_Tap0k » Thu 08 Sep 2011 11:14

I update dotConnect fot MySql to 6.50.214 version and problem still have.

If database have any procedures i have NullReferencesException and model generating without navigation properties (forignkeys)!

If database don't have procedures model generating with navigation properties and i don't have any error.

But model generatin with mapping BINARY(16) in db -> Binary in model :(

With JumpTable i have error of mapping (I skip in all tables 2 columns track_insert and track_update)

"Ошибка 1 Custom tool error: Проблема во фрагментах сопоставления, начиная со строки 58:Потенциальное нарушение ключей (burialowners.OwnerGuid) таблицы burialowners во время выполнения: столбцы (burialowners.OwnerGuid) сопоставлены со свойствами (Burials_OwnersSet.Owners.OwnerGuid) набора EntitySet Burials_OwnersSet на концептуальной стороне, но не образуют набор ключевых свойств (Burials_OwnersSet.Burials.BurialGuid, Burials_OwnersSet.Owners.OwnerGuid) набора EntitySet."

I send test database and project with support webform.


P.S. NullReferencesException is only MySql 5.5.8-enterprise-commercial-advanced-log.
With MySql Community (Ver 14.14 Distrib 5.5.15, for Win32 (x86)) i don't have error.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Tue 13 Sep 2011 12:25

We have supported the 'Binary As Guid' connection string parameter in Entity Framework runtime and Entity Data Model Wizard. Look forward to the next build of dotConnect for MySQL.
Z10y_Tap0k wrote:But model generatin with mapping BINARY(16) in db -> Binary in model
The 'Binary As Guid' connection string parameter support in Entity Developer, Entity Framework runtime, and Entity Data Model Wizard will be included in the next (not current 6.50.214) public build of dotConnect for MySQL. We will post here when the corresponding build is available for download.
Z10y_Tap0k wrote:P.S. NullReferencesException is only MySql 5.5.8-enterprise-commercial-advanced-log.
We cannot reproduce the problem with your schema using MySQL Server v 5.5.8 and dotConnect for MySQL v 6.50.214. Please try reinstalling MySQL Server v 5.5.8 and notify us about the results.

Z10y_Tap0k
Posts: 3
Joined: Mon 05 Sep 2011 06:35
Contact:

Post by Z10y_Tap0k » Tue 27 Sep 2011 05:34

I send sql shema of my database. Try to generating Devart Entity Model.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Fri 30 Sep 2011 12:46

New build of dotConnect for MySQL 6.50.228 is available for download now!
It can be downloaded from http://www.devart.com/dotconnect/mysql/download.html (trial version) or from Registered Users' Area (for users with valid subscription only).

For more information, please refer to http://www.devart.com/forums/viewtopic.php?t=22165 .

Post Reply