问题描述
我正在使用基于实体框架数据访问实体框架的目标多个数据库。
I am using Entity framework in a data access based on Entity Framework to target multiple database.
我们是一个团队与实体框架工作,2年来,和code与SQL Server 2008年制作的作品完美的现在,我们将数据库迁移到Oracle 11除权后测试相同的code preSS r2g2,并且使左外的所有指令加入或成组选择抛出异常显示该调用堆栈:
we are a team working with Entity Framework, for 2 years now, and the code produced works perfectly with sql server 2008. Now, we are testing the same code after migrating the database to Oracle 11 express r2g2, and all instructions that make left outer join or group into select throw exception showing this Call Stack :
System.Data.EntityCommandExecutionException was unhandled by user code
Message=An error occurred while executing the command definition. See the inner exception for details.
Source=System.Data.Entity
StackTrace:
at System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)
at System.Data.Objects.Internal.ObjectQueryExecutionPlan.Execute[TResultType](ObjectContext context, ObjectParameterCollection parameterValues)
at System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
at System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable<T>.GetEnumerator()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at Futura.BusinessLogic.Services.DemandeHospitalisationServices.DemandeHospitalisationService.GetMedecinList() in C:\Work\FuturaSmartDesign\Futura.BusinessLogic\Services\DemandeHospitalisationServices\DemandeHospitalisationService.cs:line 87
at GetMedecinList(DomainService , Object[] )
at System.ServiceModel.DomainServices.Server.ReflectionDomainServiceDescriptionProvider.ReflectionDomainOperationEntry.Invoke(DomainService domainService, Object[] parameters)
at System.ServiceModel.DomainServices.Server.DomainOperationEntry.Invoke(DomainService domainService, Object[] parameters, Int32& totalCount)
at System.ServiceModel.DomainServices.Server.DomainService.Query(QueryDescription queryDescription, IEnumerable`1& validationErrors, Int32& totalCount)
InnerException: Oracle.DataAccess.Client.OracleException
Message=ORA-00907: missing right parenthesis
Source=Oracle Data Provider for .NET
ErrorCode=-2147467259
DataSource=Calys
Number=907
Procedure=""
StackTrace:
at Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure, Boolean bCheck, Exception innerException)
at Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, String procedure, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, Boolean bCheck, Exception innerException)
at Oracle.DataAccess.Client.OracleCommand.ExecuteReader(Boolean requery, Boolean fillRequest, CommandBehavior behavior)
at Oracle.DataAccess.Client.OracleCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)
InnerException:
Message=Oracle 11.2.0.2.0 ne prend pas en charge APPLY
InnerException:
任何帮助将AP preciated,在此先感谢。
Any help will be appreciated,thanks in advance.
推荐答案
这是因为通过实体框架产生code:CROSS / OUTER APPLY;甲骨文不支持。这是此报告的连接,https://connect.microsoft.com/VisualStudio/feedback/details/739458/linq-query-whene-used-with-oracle-11-g2-getting-ora-00907-missing-right-parenthesis
It was due to code produced by Entity Framework : CROSS/OUTER APPLY; that Oracle didn't support.that was reported here on Connect, https://connect.microsoft.com/VisualStudio/feedback/details/739458/linq-query-whene-used-with-oracle-11-g2-getting-ora-00907-missing-right-parenthesis
什么解决办法将是AP $ P $
any workaround will be appreciated on MS Connect platform
这篇关于实体框架左外连接和组到抛出:ORA-00907:缺少右括号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!