以下是我的两个域类
class Line_Of_Business { static hasMany = [lp:Lob_Position_Type_Mapping]
String LOB_NAME;
String ACTIVE_FG;
String LOB_USER_CREATED;
Date LOB_DT_CREATED;
String LOB_USER_MODIFIED;
Date LOB_DT_MODIFIED;
//tells grails the PK
static mapping = {
version false
columns { id column:'LOB_ID' }
id generator:'sequence', params:[sequence:'LOB_ID_SN']
}
static constraints = {
LOB_NAME(nullable:false,blank:false,maxSize:100)
ACTIVE_FG(nullable:true,blank:false,maxSize:1)
LOB_USER_CREATED(nullable:true,blank:true)
LOB_DT_CREATED(nullable:true,blank:true)
LOB_USER_MODIFIED(nullable:true,blank:false)
LOB_DT_MODIFIED(nullable:true,blank:false)
}
}
import java.util.Date;
class Lob_Position_Type_Mapping {
Integer LOB_ID;
Integer CUST_POSITION_TYPES_ID;
String LPM_USER_CREATED;
Date LPM_DT_CREATED;
String LPM_USER_MODIFIED;
Date LPM_DT_MODIFIED;
static mapping = {
version false
columns { id column:'LPM_ID' }
id generator:'sequence', params:[sequence:'LPM_ID_SN']
}
static constraints = {
}
}
LOB列表正在顺利进行。当我点击每个LOB到达异常
时org.codehaus.groovy.grails.web.pages.exceptions.GroovyPagesException:处理GroovyPageView时出错:无法初始化集合:[Line_Of_Business.lp#1]
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:183)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:95)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at java.lang.Thread.run(Thread.java:662)
引起:org.hibernate.exception.SQLGrammarException:无法初始化集合:[Line_Of_Business.lp#1]
at gsp_ADMIN_MODULE_line_Of_Businessshow_gsp$_run_closure2.doCall(gsp_ADMIN_MODULE_line_Of_Businessshow_gsp.groovy:89)
at gsp_ADMIN_MODULE_line_Of_Businessshow_gsp$_run_closure2.doCall(gsp_ADMIN_MODULE_line_Of_Businessshow_gsp.groovy)
at gsp_ADMIN_MODULE_line_Of_Businessshow_gsp.run(gsp_ADMIN_MODULE_line_Of_Businessshow_gsp.groovy:110)
... 6 more
引起:java.sql.SQLSyntaxErrorException:ORA-00972:标识符太长
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:447)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:951)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:513)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:227)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:208)
at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:886)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1175)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1296)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3613)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3657)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1495)
at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:342)
... 9 more
我是grails的新手。 有人可以检查一下,让我知道我做错了什么。