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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:09:59+00:00 2026-05-25T13:09:59+00:00

This is pretty strange. class Service implements Serializable{ Integer id String serviceName String description

  • 0

This is pretty strange.

class Service implements Serializable{

Integer id
String serviceName
String description
SortedSet serviceRequirements

static hasMany = [ serviceRequirements : ServiceRequirement]

static mapping = 
{
    table 'service'

    columns {
        id column:'serviceId'

    }
}}

The resulting hibernate sql when accessing serviceInstance.serviceRequirements is:

  servicereq0_.serviceId as serviceId1_,
    servicereq0_.serviceRequirementId as serviceR1_1_,
    servicereq0_.serviceRequirementId as serviceR1_9_0_,
    servicereq0_.version as version9_0_,
    servicereq0_.description as descript3_9_0_,
    servicereq0_.header as header9_0_,
    servicereq0_.isPersonal as isPersonal9_0_,
    servicereq0_.requirementKey as requirem6_9_0_,
    servicereq0_.required as required9_0_,
    servicereq0_.serviceId as serviceId9_0_,
    servicereq0_.type as type9_0_,
    servicereq0_.weight as weight9_0_,
    servicereq0_.oauthAccessTokenUrl as oauthAc12_9_0_,
    servicereq0_.oauthAuthorizeAdditionalParameters as oauthAu13_9_0_,
    servicereq0_.oauthAuthorizeState as oauthAu14_9_0_,
    servicereq0_.oauthAuthorizeUrl as oauthAu15_9_0_,
    servicereq0_.oauthClientId as oauthCl16_9_0_,
    servicereq0_.oauthClientSecret as oauthCl17_9_0_,
    servicereq0_.oauthRequestTokenUrl as oauthRe18_9_0_,
    servicereq0_.oauthType as oauthType9_0_,
    servicereq0_.class as class9_0_ 

All fields are ok except the last “class”. It doesn’t exist at all in the database or the domain class called ServiceRequirement.

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

    A column named class is automatically added to a table when it stores multiple classes. If the ServiceRequirement class has a subclass that is also a domain class, then the table will need a class column to know what kind of ServiceRequirement it is. Grails is generally smart enough to automatically add the column if dbCreate is set, but you’ll need to add it yourself if you’re managing your schema manually.

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

Sidebar

Related Questions

This is pretty strange (admitedly, this is my first attempt with python / sqlite),
I have written something like this pretty easily in C# ( string GetUrl(new {
This is a pretty strange problem. I have a book that I have been
This is a pretty strange issue, but I think it might be that I
This pretty much has me defeated. On XP and earlier versions of Windows you
this pretty much is the thing. When in tinymce I press anything that is
I find this pretty confusing. When you want to rotate a view, it's going
I'm stuck with this pretty silly thing; I got a textfile like this; Hello::140.0::Bye
Seems I've outdone myself. All the while I was creating this pretty little 'latest
This is pretty weird. I have my Profiler open and it obviously shows that

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.