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

  • SEARCH
  • Home
  • 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 8132465
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T09:21:25+00:00 2026-06-06T09:21:25+00:00

My question is a bit tricky, I am trying best to make you understand

  • 0

My question is a bit tricky, I am trying best to make you understand what my requirement is.

Question: I want to generate a csv file from the database table ! see how.

a dummy method just for understanding.

public void convertToCsv(tablename , csv_file_path_name);

Scenario: When the table name is provided at runtime, the method requires to generate it’s csv file, (table name can be any of the available tables in the database.), And for the accomplishment of this task, the class needs to generate dynamically POJO and hibernate mapping, because we can not define ourself the POJO’s (Object Model) and hibernate mapping due to different coloumns in different tables.

tablename is provided at run time, so the method needs to generate POJO and hibernate mapping at run time.

  • 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-06T09:21:26+00:00Added an answer on June 6, 2026 at 9:21 am

    This is impossible. Hibernate needs a well-defined set of entity classes with their mapping at startup. But really, if you’re working at the table-level and just need all the columns of a table in a CSV file, Hibernate is not the right tool. You should just use JDBC.

    Select everything from the table, get the result set metadata to know the number type and name of the columns, iterate over the JDBC result set, and generate a new CSV line for every row of the result set.

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

Sidebar

Related Questions

my question is a bit different from the other ones.. i got an xsl-code
My question is a little bit tricky. at least I think. Maybe not, anyway.
I've got a bit of a tricky question I couldn't find the answer to.
This is a bit tricky question for you computer scientists. Let's say that I
Bit tricky question but this saves lot of time if you have to modify
In an earlier question (http://bit.ly/KNMN89), I encountered an issue caused by IE7's broken implementation
Summary Below is the full question (a bit complicated in its full form) here's
Bit support question. Apologies for that. I have an application linked with GNU readline.
This question is a bit of a two parter for .Net data services. This
This question is a bit open ended as I'm not sure it's possible or

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.