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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:57:53+00:00 2026-05-25T17:57:53+00:00

I am getting ORA-00972: identifier is too long error while saving a domain class

  • 0

I am getting “ORA-00972: identifier is too long” error while saving a domain class object.

Caused by: org.hibernate.exception.SQLGrammarException: could not initialize a collection: [com.intelligrape.model.Address.studentsForPermanentAddressId#79366215]

What could be the possible solutions to solve this problem except reducing the length of studentsForPermanentAddressId field. The reason being, this is a legacy database table which I can not alter.

EDIT: Added the domain class description as asked by Rob Hruska

package com.intelligrape.model

class Address {

    String address1
    String address2
    String boxNumber
    String city
    Long stateLid
    String province
    String zipCode
    Long countryLid
    Double latitude
    Double longitude
    Long radius

    static hasMany = [studentsForPermanentAddressId: Student, studentsForLocalAddressId: Student]

static constraints = {
        address1 nullable: true
        address2 nullable: true
        boxNumber nullable: true, size: 1..25
        city nullable: true, size: 1..30
        stateLid nullable: true
        province nullable: true, size: 1..64
        zipCode nullable: true, size: 1..15
        countryLid nullable: true
        latitude nullable: true
        longitude nullable: true
        radius nullable: true
            studentsForPermanentAddressId nullable: true
            studentsForLocalAddressId nullable: true
    }
}
  • 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-25T17:57:54+00:00Added an answer on May 25, 2026 at 5:57 pm

    Add a mapping block and the existing column mappings:

        package com.intelligrape.model
    
    class Address {
    
        String address1
        String address2
        String boxNumber
        String city
        Long stateLid
        String province
        String zipCode
        Long countryLid
        Double latitude
        Double longitude
        Long radius
    
        static hasMany = [studentsForPermanentAddressId: Student, studentsForLocalAddressId: Student]
        static mappings = {
             studentsForPermanentAddressId(column: 'stud_perm_addr_id')
        }
        static constraints = {
            address1 nullable: true
            address2 nullable: true
            boxNumber nullable: true, size: 1..25
            city nullable: true, size: 1..30
            stateLid nullable: true
            province nullable: true, size: 1..64
            zipCode nullable: true, size: 1..15
            countryLid nullable: true
            latitude nullable: true
            longitude nullable: true
            radius nullable: true
                studentsForPermanentAddressId nullable: true
                studentsForLocalAddressId nullable: true
        }
    }
    

    As an aside, if this weren’t a legacy database you could use this project: http://code.google.com/p/hibernate-naming-strategy-for-oracle/

    To generate correct mappings from the start.

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

Sidebar

Related Questions

Im getting this error: ORA-00904: M: invalid identifier --> if I put ('M','F') //single
I am getting ORA-02049 occasionally for some long-running and/or intensive transactions. There is seemingly
Any idea about ORA-1555: snapshot too old: rollback segment number I am getting this
Getting a rendering error for this form: 'NoneType' object has no attribute 'widget' http://dpaste.com/88585/
I am getting the 'SQL Error: ORA-01733: virtual column not allowed here' Here is
I'm getting the error [ORA-01427: single-row subquery returns more than one row] when I
Why do I keep getting this error: javax.servlet.ServletException: java.sql.SQLException: [Oracle][ODBC][Ora]ORA-00904: PURCHASE_PRICE: invalid identifier As
We're getting a ORA-00001 (unique constraint violated) in a batch job. However, the error
I have problem executing below stored procedure. I am getting error of ORA-00932: inconsistent
I'm getting ORA-01031: insufficient privileges when creating a package my own schema. Shouldn't I

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.