question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dapper | Dommel | Oracle | Invalid table name

See original GitHub issue

Hi 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: image

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, Nullable1 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:closed
  • Created 3 years ago
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
igordibucciocommented, Jun 17, 2020

Meu mapa é assim, eu uso o FluentMap Mapeamento

Tentei como você inicialmente, mas não está funcionando … comente seu código de mapeamento e decore seu modelo usando os atributos Tabela e Coluna … É por isso que você está recebendo 'IColumnNameResolver

imagem

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”

0reactions
henkmollemacommented, Aug 23, 2020

Dapper.FluentMap.Dommel v2 is released.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ORA-00903: invalid table name - Oracle Forums
I have table "t_calculates" which holds 3 records. while i'm trying to delete one of record its throwing the error "ORA-00903: invalid table ......
Read more >
Micro ORM Dapper Could not find the key property for type
1 Answer 1 ... Dapper assumes you have a column named Id in your db model, unless you specify otherwise. In this case,...
Read more >
Dapper Produces 'Invalid object name' on Insert operation
Issue resolution Dapper Produces 'Invalid object name' on Insert operation. To resolve the issue POCO names should match the table name in the...
Read more >
[Solved]-Dapper insert into table that has a composite PK-C#
AutoClassMapper assumes that your table names are singular (Ex: Car table name and Car POCO name). Each POCO has at least one property...
Read more >
WHERE x IN y" clause with dapper and postgresql throwing ...
In PostgreSQL, you can't use IN to check whether a value is inside an array, you have to use the following PostgreSQL-specific syntax:...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found