Page 1 of 1
Entity Developer 3.0 problem
Posted: Thu 02 Dec 2010 15:44
by ketchup
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 ?
Posted: Fri 03 Dec 2010 16:46
by dilbert
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)
Posted: Mon 06 Dec 2010 14:38
by AndreyR
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?
Posted: Thu 09 Dec 2010 11:38
by dilbert
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.
Posted: Thu 09 Dec 2010 14:48
by AndreyR
Thank you for the report, we have reproduced the error.
I will let you know about the results of our investigation.
Posted: Mon 20 Dec 2010 10:08
by ketchup
When will be this issue resolved? The newest version of dotConnect (from 16 December) and ED doesn't resolved it, Am I right?
Posted: Wed 22 Dec 2010 11:55
by AndreyR
The fix is available in the latest build. Please let us know if anything goes wrong.
Posted: Tue 11 Jan 2011 15:44
by dilbert
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.
Posted: Wed 12 Jan 2011 11:20
by AndreyR
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?