Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8092927
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T20:23:31+00:00 2026-06-05T20:23:31+00:00

i have a problem. Some sql in my program could be written by the

  • 0

i have a problem. Some sql in my program could be written by the user. So I don’t know which table or which columns are in this sql. Therefore i want to detect which column names are in the sql. But if a date is in the sql i get the No Dialect mapping for JDBC type: -102 error.
How could i handle that? I am using hibernate 3.6 or 4.1.3 with java. My database is an oracle database. The dialect is org.hibernate.dialect.Oracle10gDialect.

I really don’t know what is in the sql.

Here is my code:

SQLQuery q=session.createSQLQuery("SELECT * FROM tbl WHERE id = 2"); 
q.setResultTransformer(AliasToEntityMapResultTransformer.INSTANCE); 
List<Map<String,Object>> aliasToValueMapList=q.list();
for(Map<String,Object> map : aliasToValueMapList){
    System.out.println(map.keySet());
    break;
}

I hope anyone knows a solution for this problem.

Greetz

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T20:23:32+00:00Added an answer on June 5, 2026 at 8:23 pm

    Your query is attempt to return a column that the JDBC ResultSetMetaData is reporting a type (-102) which Hibernate does not know how to read. You need to register the type for that column with the query using org.hibernate.SQLQuery#addScalar or you may not be able to use that transformer and actually define the entire result set mapping to your entity org.hibernate.SQLQuery#addRoot/org.hibernate.SQLQuery#addEntity. See the docs for usage

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm getting crazy with this problem: I have got some Oracle SQL-Reports to redesign
I am facing a very annoying problem. I have written (in Notepad++) some SQL
In this case I have some code which is working without problem in an
I have some problem with this mongoid. It's my first time to use mongoDB,
I have a SQL Server table full of orders that my program needs to
I have a web based program which chooses some records from a database using
I have written a very small C# program, that uses a very small SQL
i have a problem in inserting some data into a table. I have done
There're some problem. I have a report which is executed long time. When the
I have the following problem: We have several different databases on which our program

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.