Dapper | Dommel | Oracle | Invalid table name
See original GitHub issueHi there,
I am trying to get a simple select query from oracle database as shown in the below screenshot. It is not working for me, throwing an error, invalid table name. I am 100% sure there is no issue with my table and schema name and column mappings. It seems Dapper/Dommel is causing some issue in generating the sql with correct table name.
May I know how can I see what SQL query my get statement generating…by enabling logging or some way…
My DBA’s will not allow SQL Profilers to see the query…
Error and Code:
In case if you are looking for stack trace:
at OracleInternal.ServiceObjects.OracleConnectionImpl.VerifyExecution(Int32& cursorId, Boolean bThrowArrayBindRelatedErrors, SqlStatementType sqlStatementType, Int32 arrayBindCount, OracleException& exceptionForArrayBindDML, Boolean& hasMoreRowsInDB, Boolean bFirstIterationDone)
at OracleInternal.ServiceObjects.OracleCommandImpl.ExecuteReader(String commandText, OracleParameterCollection paramColl, CommandType commandType, OracleConnectionImpl connectionImpl, OracleDataReaderImpl& rdrImpl, Int32 longFetchSize, Int64 clientInitialLOBFS, OracleDependencyImpl orclDependencyImpl, Int64[] scnForExecution, Int64[]& scnFromExecution, OracleParameterCollection& bindByPositionParamColl, Boolean& bBindParamPresent, Int64& internalInitialLOBFS, OracleException& exceptionForArrayBindDML, OracleConnection connection, OracleLogicalTransaction& oracleLogicalTransaction, IEnumerable1 adrianParsedStmt, Boolean isDescribeOnly, Boolean isFromEF) at Oracle.ManagedDataAccess.Client.OracleCommand.ExecuteReader(Boolean requery, Boolean fillRequest, CommandBehavior behavior) at Oracle.ManagedDataAccess.Client.OracleCommand.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) **_at Dapper.SqlMapper.ExecuteReaderWithFlagsFallback(IDbCommand cmd, Boolean wasClosed, CommandBehavior behavior) at Dapper.SqlMapper.QueryRowImpl[T](IDbConnection cnn, Row row, CommandDefinition& command, Type effectiveType) at Dapper.SqlMapper.QueryFirstOrDefault[T](IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable
1 commandTimeout, Nullable`1 commandType)
at Dommel.DommelMapper.Get[TEntity](IDbConnection connection, Object id, IDbTransaction transaction)_**
I would really appreciate your quick response…
Thank you, Prem.
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (2 by maintainers)
When I change the model by inserting the annotations in it, it works correctly. I’m sorry, I’m still learning to use this type of technology, but is this a mistake and will it be corrected? or will it continue like this? I like to use FluentMap, because I don’t make my models “dirty”
Dapper.FluentMap.Dommel v2 is released.