Showstopper: database-related methods of OracleEntityProviderServices ignore all but first entity containers
Posted: Sat 29 Mar 2014 14:06
Database-related methods of OracleEntityProviderServices (i.e. DeleteDatabase, CreateDatabase and CreateDatabaseScript) ignore all but first entity containers in the given StoreItemCollection.
Both SQL Server and SQL Server Compact data providers consider all the containers in the collection - and this is the correct behavior, which is extremely important for our product.
This seems to be the extension method extracting "all" entity sets from the given ItemCollection (somewhere in the obfuscated code of Devart.Common.Entity):
In this method, instead of getting the first entity container, all available containers should be iterated:
Both SQL Server and SQL Server Compact data providers consider all the containers in the collection - and this is the correct behavior, which is extremely important for our product.
This seems to be the extension method extracting "all" entity sets from the given ItemCollection (somewhere in the obfuscated code of Devart.Common.Entity):
Code: Select all
public static List<EntitySet> ???(this ItemCollection collection)
{
var list = new List<EntitySet>();
var container = collection.GetItems<EntityContainer>().FirstOrDefault();
if (container != null)
list.AddRange(container.BaseEntitySets.OfType<EntitySet>().Where(...));
return list;
}
Code: Select all
...
collection.GetItems<EntityContainer>().SelectMany(container => container.BaseEntitySets).OfType<EntitySet>().Where(...)
...