Entity Developer 3.0 problem

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
ketchup
Posts: 11
Joined: Thu 09 Sep 2010 13:25

Entity Developer 3.0 problem

Post by ketchup » Thu 02 Dec 2010 15:44

After installation new version of Entity Developer we have a problem with model generation. Quite a large model is being opened correctly with all classes added previously but when we add additional tables from Database Explorer some old (previously added) classes disappear. We can see this in Model Explorer. Of course orginal model was generated in previous version of ED.

Any idea what could be a problem ?

dilbert
Posts: 68
Joined: Tue 28 Apr 2009 10:11

Post by dilbert » Fri 03 Dec 2010 16:46

Same problem!
I think the problem concerns tables with primary key containing more than one column.
And this is not only occuring in models generated with previous version. I haven't managed to create completely new model. It has always contained only tables with atomic primary key.

(Tried with dotConnect for MySql 6.0.58)

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Mon 06 Dec 2010 14:38

I have made some tests and succeeded in both creating a model with composite key and updating it. Could you please send us (support * devart * com, subject "Update From Database") small test models the error is reproducible on?

dilbert
Posts: 68
Joined: Tue 28 Apr 2009 10:11

Post by dilbert » Thu 09 Dec 2010 11:38

The problem appears for composite primary key that participates in foreign key as well. Try the following example:

Code: Select all

CREATE TABLE `order` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 ;

CREATE TABLE `product` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 ;

CREATE TABLE `order_item` (
  `id_order` int(11) NOT NULL,
  `id_product` int(11) NOT NULL,
  PRIMARY KEY (`id_order`,`id_product`),
  KEY `id_product` (`id_product`)
) ENGINE=InnoDB;

ALTER TABLE `order_item`
  ADD CONSTRAINT `order_item_ibfk_2` FOREIGN KEY (`id_product`) REFERENCES `product` (`id`),
  ADD CONSTRAINT `order_item_ibfk_1` FOREIGN KEY (`id_order`) REFERENCES `order` (`Id`);
I sent you this script along with generated model to your support email.

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Thu 09 Dec 2010 14:48

Thank you for the report, we have reproduced the error.
I will let you know about the results of our investigation.

ketchup
Posts: 11
Joined: Thu 09 Sep 2010 13:25

Post by ketchup » Mon 20 Dec 2010 10:08

When will be this issue resolved? The newest version of dotConnect (from 16 December) and ED doesn't resolved it, Am I right?

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Wed 22 Dec 2010 11:55

The fix is available in the latest build. Please let us know if anything goes wrong.

dilbert
Posts: 68
Joined: Tue 28 Apr 2009 10:11

Post by dilbert » Tue 11 Jan 2011 15:44

Sorry, but the behavior is still the same. The fix is not available in the latest version.
It could be reproduced by the exactly same schema as posted above.

Thanks for attention.

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Wed 12 Jan 2011 11:20

I have just repeated the tests using dotConnect for MySQL 6.0.69 and the tables remain unchanged after running the Update Model From Database wizard.
Could you please provide the exact steps to reproduce the issue?

Post Reply