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 977423
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T03:54:05+00:00 2026-05-16T03:54:05+00:00

For our grails application, I’ve written a method that lets you upload a CSV

  • 0

For our grails application, I’ve written a method that lets you upload a CSV file full of contacts, and it will parse the file and create contacts out of the data. I’ve used a test file of my own (hard-coding which fields mean what) and it works great.

But of course I can’t leave the field references hard-coded like that, so my next step is to show the user a screen letting them map the columns in their file to our database fields (columns A and B hold names, column C holds e-mail, etc).

My question: what’s the best way to temporarily store the data I extract in the first part, so it can be used at the end of the second? A domain class would seem like the logical choice, but I haven’t found a graceful way to do this at all. Hibernate doesn’t seem to be fond of 2D string arrays, and to implement it in an OO fashion would require several domain classes (ImportedCsv, CsvRow). Is that acceptable to have several top-level domain classes for such a small and temporary process?

I’m a bit of a grails newbie, so I’m not sure what’s hackish and what’s graceful. What would you do?

  • 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-05-16T03:54:06+00:00Added an answer on May 16, 2026 at 3:54 am
    upload the file in the first action
    store a blob in db 
    parse the columns out display ui to map column to fields 
    second action read the blob from db, create new domain objects, delete blob from db
    

    i think storing the csv file in the session might lead to some problems.

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

Sidebar

Ask A Question

Stats

  • Questions 499k
  • Answers 500k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Using NULL for id: INSERT INTO `database`.`table` (`id`, `user`, `result`)… May 16, 2026 at 1:49 pm
  • Editorial Team
    Editorial Team added an answer It's not elegant, but this worked for me: foos.SingleOrDefault(f =>… May 16, 2026 at 1:49 pm
  • Editorial Team
    Editorial Team added an answer The only difference between the two is that require and… May 16, 2026 at 1:49 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

We have developed an application using Grails, intended to be hosted on our public
At our company, we use a base ant file that is included by everyone
We started building our website / application back in 2006, and chose to use
we are programming in Grails and as part our system requirement we need to
Today I upgraded our grails app from 1.0.3 to 1.3.3 and, of course, things
Our team has some code guidelines that I would like to enforce via stylecop
Our application has a background thread which spawns a process through System.Diagnostics.Process : Process.Start(
Our site has some very complicated form controls that are submitted and then show
Our app is a simple portal (will be deployed as azure webrole) with following
I have spent the last few days attempting to integrate a Grails (version 1.3.2)

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.