में इसे टालने के लिए सबसे अच्छी रणनीति मुझे डोमेन क्लास ऑब्जेक्ट को सहेजते समय "ORA-00972: पहचानकर्ता बहुत लंबा" त्रुटि प्राप्त हो रहा है।ओआरए -00 9 72: पहचानकर्ता बहुत लंबा है - Grails
Caused by: org.hibernate.exception.SQLGrammarException: could not initialize a collection: [com.intelligrape.model.Address.studentsForPermanentAddressId#79366215]
क्या studentsForPermanentAddressId क्षेत्र की लंबाई को कम करने को छोड़कर इस समस्या को हल करने के लिए संभव समाधान हो सकता है। कारण यह है कि यह एक विरासत डेटाबेस तालिका है जिसे मैं बदल नहीं सकता।
संपादित करें: के रूप में रोब 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
}
}
यह दिलचस्प है, ओरेकल की लंबाई सीमा 30 है, और 'छात्र फॉरपेरेंटेंट एड्रेसआईडी' "केवल" में 2 9 वर्ण हैं। – NullUserException
@NullUserException - मुझे नहीं लगता कि 'studentsForPermanentAddressId' वास्तविक डेटाबेस कॉलम का नाम है; यह शायद 'students_for_permanent _...' जैसी किसी चीज़ पर मैपिंग कर रहा है। –
@ मोहम्मद - क्या आप डोमेन क्लास कोड प्रदान कर सकते हैं जो प्रश्न में रिश्ते को परिभाषित कर रहा है? –