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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:56:02+00:00 2026-05-28T13:56:02+00:00

Currently I have a Grails domain class with a HashMap of strings (HashMap metadata

  • 0

Currently I have a Grails domain class with a HashMap of strings (HashMap metadata = new HashMap().

Everything is working fine with database persistence on creation (stored as BLOB by the way), start-up, shutdown, etc…

I have a nasty feeling that this is not okay for some reason, if that is the case why? if not, then never mind.

Versions etc Grails 2.0, Groovy 1.8, Java 1.6, Tomcat 6 MySQL 5.latest

  • 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-28T13:56:03+00:00Added an answer on May 28, 2026 at 1:56 pm

    I would say that this is probably not the best practice, since you never really know how this list of strings may grow in the future.

    A simple example might be that in the future, you want to know when a particular field was added, which means you would have to change your entire domain model and move the hashmap out into child domains.

    From experience, it might be easier to model this as a child element with name and value properties.

    This also makes it easier to write queries against this hashmap, so if you wanted to find elements that have the key ‘blah’, you can use the dynamic finder and related querying mechanisms.

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

Sidebar

Related Questions

I'm currently working with Grails 1.3.7, and I have the following domain classes connected
I am new to Grails and currently stuck at the following problem: I have
I've got a grails domain class I have to persist in Redis, something like
I currently have an MS Access application that connects to a PostgreSQL database via
I currently have an existing database and I am using the LINQtoSQL generator tool
I currently have a Grails application I'm evaluating to port to Google App Engine
I have developed a grails application that stores a great deal of information. Currently,
We have an application in Grails 2.0 that we have working when we run
I am currently working with User objects -- each of which have many Goal
In a grails project, some of the domain classes have a region field (not

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.