Entity Developer 3.0 problem
Entity Developer 3.0 problem
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 ?
Any idea what could be a problem ?
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)
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)
The problem appears for composite primary key that participates in foreign key as well. Try the following example:
I sent you this script along with generated model to your support email.
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`);